Skip to content

Commit 2c61b5b

Browse files
Remove check on event's dispatch flag
1 parent 60ea69b commit 2c61b5b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

docs/index.bs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1605,15 +1605,13 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
16051605

16061606
The <dfn method for="InstallEvent"><code>addRoutes(|rules|)</code></dfn> method steps are:
16071607

1608-
1. Let |event| be [=this=].
1609-
1. If |event|'s [=dispatch flag=] is unset, [=throw=] an "{{InvalidStateError}}" {{DOMException}}.
16101608
1. If |rules| is a {{RouterRule}} dictionary, set |rules| to &#x00AB; |rules| &#x00BB;.
16111609
1. Let |serviceWorker| be the [=current global object=]'s associated [=ServiceWorkerGlobalScope/service worker=].
16121610
1. For each |rule| of |rules|:
16131611
1. If running the [=Verify Router Condition=] algorithm with |rule|["{{RouterRule/condition}}"] and |serviceWorker| returns false, return [=a promise rejected with=] a {{TypeError}}.
16141612
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}}.
16151613
1. Let |lifetimePromise| be a new [=promise=].
1616-
1. [=ExtendableEvent/Add lifetime promise=] |lifetimePromise| to |event|.
1614+
1. [=ExtendableEvent/Add lifetime promise=] |lifetimePromise| to [=this=].
16171615

16181616
Note: {{InstallEvent/addRoutes(rules)|event.addRoutes(rules)}} extends the lifetime of the event by default as if {{ExtendableEvent/waitUntil()|event.waitUntil(promise)}} is called.
16191617

0 commit comments

Comments
 (0)