2020-02-27 20:56:14 +00:00
|
|
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
|
|
|
|
|
|
self.addEventListener("install", () => {
|
2021-02-18 21:35:30 +00:00
|
|
|
console.log("[Service Worker] installed")
|
2020-02-27 20:56:14 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
self.addEventListener("activate", (event: any) => {
|
|
|
|
event.waitUntil((self as any).clients.claim())
|
2021-02-18 21:35:30 +00:00
|
|
|
console.log("[Service Worker] activated")
|
2020-02-27 20:56:14 +00:00
|
|
|
})
|
|
|
|
|
2020-08-27 16:33:34 +00:00
|
|
|
self.addEventListener("fetch", () => {
|
|
|
|
// Without this event handler we won't be recognized as a PWA.
|
2020-02-27 20:56:14 +00:00
|
|
|
})
|