Archived
1
0
This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
code-server/src/browser/serviceWorker.ts

15 lines
402 B
TypeScript
Raw Normal View History

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