This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CODE IN PAGE: | |
window.addEventListener('load', function() { | |
navigator.serviceWorker.register('/sw.js').then(function(registration) { | |
console.log('ServiceWorker registration successful with scope: ', registration.scope); | |
}).catch(function(err) { | |
console.log('ServiceWorker registration failed: ', err); | |
}); | |
}); | |