1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2025-01-05 16:38:44 +00:00
code-server-2/src/browser/serviceWorker.ts

14 lines
356 B
TypeScript
Raw Normal View History

/* 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.
})