@hydra-acp/browser 0.1.30 → 0.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/index.html +91 -32
- package/dist/ui/sw.js +15 -6
- package/package.json +1 -1
package/dist/ui/sw.js
CHANGED
|
@@ -17,12 +17,21 @@ self.addEventListener("activate", (event) => {
|
|
|
17
17
|
event.waitUntil(self.clients.claim());
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
// Chrome's install-eligibility check wants a fetch handler present,
|
|
21
|
+
// even though this worker does no offline caching; without one, the
|
|
22
|
+
// install prompt doesn't show. Registering the listener is enough — it
|
|
23
|
+
// deliberately does NOT call respondWith, so every request falls
|
|
24
|
+
// through to the network exactly as if no service worker existed.
|
|
25
|
+
//
|
|
26
|
+
// This used to be `event.respondWith(fetch(event.request))`, described
|
|
27
|
+
// as a pure passthrough. It isn't: respondWith makes the worker the
|
|
28
|
+
// responder, so a rejected fetch becomes a synthetic network-error
|
|
29
|
+
// response plus an uncaught rejection in the worker, instead of the
|
|
30
|
+
// ordinary failure the caller already handles. Any moment the server
|
|
31
|
+
// is briefly unreachable (an extension restart, a dropped tailnet
|
|
32
|
+
// link) surfaced as a hard ERR_FAILED and console noise rather than a
|
|
33
|
+
// retryable poll error.
|
|
34
|
+
self.addEventListener("fetch", () => {});
|
|
26
35
|
|
|
27
36
|
// Payload shape is whatever turn-notify-callback.ts's sendPushToAll
|
|
28
37
|
// sends: { title, body, url, tag }. No push subscription rides through
|