2020-02-28 03:56:14 +07:00
|
|
|
/* 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())
|
|
|
|
})
|
|
|
|
|
2020-08-27 23:33:34 +07:00
|
|
|
self.addEventListener("fetch", () => {
|
|
|
|
// Without this event handler we won't be recognized as a PWA.
|
2020-02-28 03:56:14 +07:00
|
|
|
})
|