- From: Yoshisato Yanagisawa <notifications@github.com>
- Date: Mon, 27 Jan 2025 02:33:23 -0800
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/ServiceWorker/pull/1744/review/2575063737@github.com>
@yoshisatoyanagisawa commented on this pull request.
> 1. For each |rule| of |rules|:
1. If running the [=Verify Router Condition=] algorithm with |rule|["{{RouterRule/condition}}"] and |serviceWorker| returns false, return [=a promise rejected with=] a {{TypeError}}.
- 1. Append |rule| to |routerRules|.
- 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}}.
- 1. Set |serviceWorker|'s [=service worker/list of router rules=] to |routerRules|.
- 1. Return [=a promise resolved with=] undefined.
+ 1. If |rule|["{{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}}.
+ 1. Let |lifetimePromise| be a new [=promise=].
+ 1. [=ExtendableEvent/Add lifetime promise=] |lifetimePromise| to |event|.
+
+ Note: {{InstallEvent/addRoutes(rules)|event.addRoutes(rules)}} extends the lifetime of the event by default as if {{ExtendableEvent/waitUntil()|event.waitUntil(promise)}} is called.
+
+ 1. Let |promise| be a new [=promise=].
+ 1. [=In parallel=]:
Thanks.
done.
--
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1744#discussion_r1930305428
You are receiving this because you are subscribed to this thread.
Message ID: <w3c/ServiceWorker/pull/1744/review/2575063737@github.com>
Received on Monday, 27 January 2025 10:33:27 UTC