-
-
Save bm2ilabs/108e6f531e3d6b5d6ba1d285e671b396 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
if ('serviceWorker' in navigator) { | |
Use the window load event to keep the page load performant | |
window.addEventListener('load', () => { | |
navigator.serviceWorker.register('/service-worker.js'); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment