-
-
Save kypflug/5c8946ab14d63ae1220674e973d9275f to your computer and use it in GitHub Desktop.
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
<script> | |
if (navigator.serviceWorker) { | |
navigator.serviceWorker.register('sw.js', {scope: '/'}) | |
.then( | |
function (registration) { | |
console.log('Service worker registered!'); | |
}, | |
function (err) { | |
console.error('Installation failed!', err); | |
} | |
); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment