a839da34d7
We need the handler to be recognized as a PWA but we can just let the original offline browser message show instead of our own message. See #1925 and #1979.
14 lines
356 B
TypeScript
14 lines
356 B
TypeScript
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
|
|
self.addEventListener("install", () => {
|
|
console.log("[Service Worker] install")
|
|
})
|
|
|
|
self.addEventListener("activate", (event: any) => {
|
|
event.waitUntil((self as any).clients.claim())
|
|
})
|
|
|
|
self.addEventListener("fetch", () => {
|
|
// Without this event handler we won't be recognized as a PWA.
|
|
})
|