Added serviceWorker

This commit is contained in:
Timon Ostertun
2020-09-23 19:58:35 +02:00
parent b06e2bf6ce
commit 8855128600
3 changed files with 95 additions and 4 deletions

View File

@@ -8,7 +8,7 @@
//Loading the Service Worker
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
// TODO navigator.serviceWorker.register('_service-worker.js', {scope: ''});
navigator.serviceWorker.register('<?php echo SERVER_ADDR; ?>/service-worker.js.php');
});
}