serviceworker-install.js | ●●●●● patch | view | raw | blame | history |
serviceworker-install.js
@@ -2,7 +2,9 @@ window.addEventListener('load', function() { navigator.serviceWorker.register('/serviceworker.js').then(function(registration) { console.log('Service Worker registration successful. ', registration); if(navigator.serviceWorker.controller) { navigator.serviceWorker.controller.postMessage({action: 'skipWaiting'}); } }).catch(function(err) { console.log('Service Worker registration failed. ', err); });