Created
June 5, 2017 14:41
-
-
Save anteburazer/48e875ed2394fe4af52d90695a326b32 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 ('serviceWorker' in navigator) { | |
navigator.serviceWorker | |
.register('/service-worker.js') | |
.then(function(registration) { | |
console.log('Service Worker registered'); | |
}).catch(function(err) { | |
console.log('Service Worker registration failed: ', err); | |
}); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment