20 lines
695 B
JavaScript
20 lines
695 B
JavaScript
// Minimal service worker: exists only so the app satisfies PWA
|
|
// installability checks (manifest + registered SW with a fetch handler).
|
|
// The app requires internet access for its database anyway, so there is
|
|
// deliberately no offline caching here -- every request just passes
|
|
// through to the network.
|
|
|
|
self.addEventListener("install", () => {
|
|
self.skipWaiting();
|
|
});
|
|
|
|
self.addEventListener("activate", (event) => {
|
|
event.waitUntil(self.clients.claim());
|
|
});
|
|
|
|
self.addEventListener("fetch", () => {
|
|
// No-op: let the browser handle the request normally. A fetch handler
|
|
// must exist for installability, but this app intentionally does not
|
|
// cache or serve anything offline.
|
|
});
|