Created
July 2, 2018 21:01
-
-
Save FlorianRappl/44fa42f03b62e1e13620ce581aae21e7 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
// check for support | |
if ('serviceWorker' in navigator) { | |
try { | |
// calls navigator.serviceWorker.register('sw.js'); | |
registerServiceWorker(); | |
} catch (e) { | |
console.error(e); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment