Skip to content

Instantly share code, notes, and snippets.

@Chalarangelo
Last active July 17, 2017 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Chalarangelo/49504bdd41ebfd6926e0fc7f4c0ccbd1 to your computer and use it in GitHub Desktop.
Save Chalarangelo/49504bdd41ebfd6926e0fc7f4c0ccbd1 to your computer and use it in GitHub Desktop.
if ('serviceWorker' in navigator) {
navigator.serviceWorker
.register('./service-worker.js')
.then(function() { console.log('Registered service worker!'); });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment