Created
August 17, 2025 18:15
-
-
Save kulterryan/b4fcac9b6392dc47b910ae6cf8af0fd8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* Custom SW registration (manual) */ | |
if ('serviceWorker' in navigator) { | |
window.addEventListener('load', () => { | |
navigator.serviceWorker.register('/sw.js').then(reg => { | |
console.log('[pwa] service worker registered', reg.scope) | |
}).catch(err => { | |
console.warn('[pwa] service worker registration failed', err) | |
}) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment