Skip to content

Commit 96e4795

Browse files
Ensure "race-network-and-fetch-handler" is used with a fetch handler
As covered in https://github.com/WICG/service-worker-static-routing-api?tab=readme-ov-file#how-does-it-work-if-there-is-no-fetch-handler, the fetch handler must exists not only for the "fetch-handler" source but also the "race-network-and-fetch-handler" source. The "race-network-and-fetch-handler" source was not written in the last update.
1 parent 5408e2e commit 96e4795

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/index.bs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1610,7 +1610,7 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
16101610
1. For each |rule| of |rules|:
16111611
1. If running the [=Verify Router Condition=] algorithm with |rule|["{{RouterRule/condition}}"] and |serviceWorker| returns false, return [=a promise rejected with=] a {{TypeError}}.
16121612
1. Append |rule| to |routerRules|.
1613-
1. If |routerRules| [=list/contains=] a {{RouterRule}} whose {{RouterRule/source}} is "{{RouterSourceEnum/fetch-event}}" and |serviceWorker|'s [=set of event types to handle=] does not [=set/contain=] {{ServiceWorkerGlobalScope/fetch!!event}}, return [=a promise rejected with=] a {{TypeError}}.
1613+
1. If |routerRules| [=list/contains=] a {{RouterRule}} whose {{RouterRule/source}} is either of "{{RouterSourceEnum/fetch-event}}" or "{{RouterSourceEnum/race-network-and-fetch-handler}}", and |serviceWorker|'s [=set of event types to handle=] does not [=set/contain=] {{ServiceWorkerGlobalScope/fetch!!event}}, return [=a promise rejected with=] a {{TypeError}}.
16141614
1. Set |serviceWorker|'s [=service worker/list of router rules=] to |routerRules|.
16151615
1. Return [=a promise resolved with=] undefined.
16161616

0 commit comments

Comments
 (0)