Skip to content

Instantly share code, notes, and snippets.

@depoulo

depoulo/serviceworker.js

Last active Jun 20, 2019
Embed
What would you like to do?
try {
document.body.innerHTML =
'<div id="sw-failure" style="z-index: 1; position: fixed; pointer-events: none">ServiceWorker failed</div>'
+ document.body.innerHTML
} catch (_err) {
console.log('Hello from ServiceWorker', String(registration))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment