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
Asher a839da34d7
Remove custom offline text (#2007)
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.
2020-08-27 11:33:34 -05:00

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