- From: Leo Tenenbaum <notifications@github.com>
- Date: Thu, 24 Sep 2026 12:33:21 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/ServiceWorker/issues/1850@github.com>
ltenmoz created an issue (w3c/ServiceWorker#1850) The active service worker is specified for windows, dedicated worker, and shared worker clients here: https://w3c.github.io/ServiceWorker/#control-and-use, but not for service workers. This means that fetches originating from service workers cannot be intercepted, due to step 10 of [handle fetch](https://w3c.github.io/ServiceWorker/#handle-fetch): > 10. Else if request is a [subresource request](https://fetch.spec.whatwg.org/#subresource-request), then: > 1 If client’s [active service worker](https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-active-service-worker) is non-null, set registration to client’s [active service worker](https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-active-service-worker)’s [containing service worker registration](https://w3c.github.io/ServiceWorker/#dfn-containing-service-worker-registration). > 2 Else, return null. However, in https://github.com/whatwg/fetch/issues/303, it was decided that for `showNotification()`, the image requests should always be intercepted, even if the notification is created from a service worker. So perhaps we need to specify that for a service worker, the active service worker is itself (well, it's a bit awkward because "service worker client" already has a different definition from "a client that is a service worker"). -- Reply to this email directly or view it on GitHub: https://github.com/w3c/ServiceWorker/issues/1850 You are receiving this because you are subscribed to this thread. Message ID: <w3c/ServiceWorker/issues/1850@github.com>
Received on Thursday, 24 September 2026 19:33:25 UTC