You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. If running the [=Verify Router Condition=] algorithm with |rule|["{{RouterRule/condition}}"] and |serviceWorker| returns false, return [=a promise rejected with=] a {{TypeError}}.
1614
1614
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}}.
1615
-
1. Let |promise| be a new [=promise=].
1616
-
1. [=ExtendableEvent/Add lifetime promise=] |promise| to |event|.
1615
+
1. Let |lifetimePromise| be a new [=promise=].
1616
+
1. [=ExtendableEvent/Add lifetime promise=] |lifetimePromise| to |event|.
1617
1617
1618
1618
Note: {{InstallEvent/addRoutes(rules)|event.addRoutes(rules)}} extends the lifetime of the event by default as if {{ExtendableEvent/waitUntil()|event.waitUntil(promise)}} is called.
1619
1619
1620
+
1. Let |promise| be a new [=promise=].
1621
+
1. [=In parallel=]:
1622
+
1. Upon [=upon fulfillment|fulfillment=] or [=upon rejection|rejection=] of |promise|, resolve |lifetimePromise| with undefined.
1623
+
1624
+
Note: this step is for making |lifetimePromise| always fullfilled to avoid the install event failure.
1625
+
1620
1626
1. Let |serviceWorkerEventLoop| be the [=current global object=]'s [=event loop=].
1621
1627
1. [=Queue a task=] to run the following steps on |serviceWorkerEventLoop| using the [=DOM manipulation task source=]:
1622
1628
1. Let |allRules| be a copy of |serviceWorker|'s [=list of router rules=].
0 commit comments