Skip to content

Commit 5873780

Browse files
Merge branch 'w3c:main' into fix2
2 parents 96e4795 + 4e7e0fa commit 5873780

File tree

2 files changed

+23
-15
lines changed

2 files changed

+23
-15
lines changed

.github/workflows/generate.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ on:
77
jobs:
88
main:
99
name: Build, Validate and Deploy Locally
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-22.04
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v4
1313
- uses: w3c/spec-prod@v2
1414
with:
1515
GH_PAGES_BRANCH: gh-pages

docs/index.bs

+21-13
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ ED: https://w3c.github.io/ServiceWorker/
55
TR: https://www.w3.org/TR/service-workers/
66
Shortname: service-workers
77
Level:
8-
Editor: Jake Archibald, w3cid 76394, Google, [email protected]
9-
Editor: Marijn Kruisselbrink, w3cid 72440, Google, mek@chromium.org
8+
Editor: Monica Chintala, w3cid 160353, Microsoft, [email protected]
9+
Editor: Yoshisato Yanagisawa, w3cid 142513, Google, yyanagisawa@chromium.org
1010
Former Editor: Alex Russell, Google, [email protected]
11+
Former Editor: Jake Archibald, w3cid 76394, Google, [email protected]
1112
Former Editor: Jungkee Song, Microsoft‚ represented Samsung until April 2018, [email protected]
13+
Former Editor: Marijn Kruisselbrink, w3cid 72440, Google, [email protected]
1214
Repository: w3c/ServiceWorker
1315
Group: serviceworkers
1416
!Tests: <a href=https://github.com/web-platform-tests/wpt/tree/master/service-workers>web-platform-tests service-workers/</a> (<a href=https://github.com/web-platform-tests/wpt/labels/service-workers>ongoing work</a>)
@@ -500,8 +502,8 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
500502
<dd>a new {{WindowClient}} object that represents |incumbentGlobal|'s [=relevant settings object=].</dd>
501503

502504
<dt>Otherwise</dt>
503-
<dd>a new {{Client}} object that represents |incumbentGlobal|'s associated worker
504-
</dd>
505+
<dd>a new {{Client}} object that represents |incumbentGlobal|'s associated worker</dd>
506+
</dl>
505507
1. Let |origin| be the [=serialization of an origin|serialization=] of |incumbentSettings|'s [=environment settings object/origin=].
506508
1. Let |destination| be the {{ServiceWorkerGlobalScope}} object associated with |serviceWorker|.
507509
1. Let |deserializeRecord| be <a abstract-op>StructuredDeserializeWithTransfer</a>(|serializeWithTransferResult|, |destination|'s [=global object/Realm=]).
@@ -1454,7 +1456,7 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
14541456
1. Run these substeps <a>in parallel</a>:
14551457
1. Let |newContext| be a new [=top-level browsing context=].
14561458
1. [=Queue a task=] to run the following steps on |newContext|'s {{Window}} object's [=environment settings object=]'s [=responsible event loop=] using the [=user interaction task source=]:
1457-
1. *HandleNavigate*: [=Navigate=] |newContext| to |url| with [=exceptionsEnabled=] true, and [=historyHandling=] "<code>replace</code>".
1459+
1. *HandleNavigate*: [=Navigate=] |newContext| to |url| with [=navigate/exceptionsEnabled=] true, and <i>[=navigate/historyHandling=]</i> "<code>replace</code>".
14581460
1. If the algorithm steps invoked in the step labeled *HandleNavigate* [=throws=] an exception, [=queue a task=] to reject |promise| with the exception, on |serviceWorkerEventLoop| using the [=DOM manipulation task source=], and abort these steps.
14591461
1. Let |frameType| be the result of running [=Get Frame Type=] with |newContext|.
14601462
1. Let |visibilityState| be |newContext|'s <a>active document</a>'s {{Document/visibilityState}} attribute value.
@@ -1563,6 +1565,7 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
15631565
<pre class="idl">
15641566
[Exposed=ServiceWorker]
15651567
interface InstallEvent : ExtendableEvent {
1568+
constructor(DOMString type, optional ExtendableEventInit eventInitDict = {});
15661569
Promise&lt;undefined&gt; addRoutes((RouterRule or sequence&lt;RouterRule&gt;) rules);
15671570
};
15681571

@@ -2095,7 +2098,7 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
20952098
1. Invoke [=Batch Cache Operations=] with |operations|. If this [=throws=] an exception, set |errorData| to the exception.
20962099
1. [=Queue a task=], on |cacheJobPromise|'s [=relevant settings object=]'s [=responsible event loop=] using the [=DOM manipulation task source=], to perform the following substeps:
20972100
1. If |errorData| is null, resolve |cacheJobPromise| with undefined.
2098-
1. Else, reject |cacheJobPromise| with a [=exception/create|new=] [=exception=] with |errorData| and a user agent-defined [=exception/message=], in |realm|.
2101+
1. Else, reject |cacheJobPromise| with a [=exception/create|new=] [=exception=] with |errorData|, in |realm|.
20992102
1. Return |cacheJobPromise|.
21002103
</section>
21012104

@@ -2140,7 +2143,7 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
21402143
1. Invoke [=Batch Cache Operations=] with |operations|. If this [=throws=] an exception, set |errorData| to the exception.
21412144
1. [=Queue a task=], on |cacheJobPromise|'s [=relevant settings object=]'s [=responsible event loop=] using the [=DOM manipulation task source=], to perform the following substeps:
21422145
1. If |errorData| is null, resolve |cacheJobPromise| with undefined.
2143-
1. Else, reject |cacheJobPromise| with a [=exception/create|new=] [=exception=] with |errorData| and a user agent-defined [=exception/message=], in |realm|.
2146+
1. Else, reject |cacheJobPromise| with a [=exception/create|new=] [=exception=] with |errorData|, in |realm|.
21442147
</section>
21452148

21462149
<section algorithm="cache-delete">
@@ -2169,7 +2172,7 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
21692172
1. If |errorData| is null, then:
21702173
1. If |requestResponses| [=list/is not empty=], resolve |cacheJobPromise| with true.
21712174
1. Else, resolve |cacheJobPromise| with false.
2172-
1. Else, reject |cacheJobPromise| with a [=exception/create|new=] [=exception=] with |errorData| and a user agent-defined [=exception/message=], in |realm|.
2175+
1. Else, reject |cacheJobPromise| with a [=exception/create|new=] [=exception=] with |errorData|, in |realm|.
21732176
1. Return |cacheJobPromise|.
21742177
</section>
21752178

@@ -2641,10 +2644,10 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
26412644
: Output
26422645
:: none
26432646

2644-
1. If |job|'s [=job/client=] is not null, [=queue a task=], on |job|'s [=job/client=]'s [=responsible event loop=] using the [=DOM manipulation task source=], to reject |job|'s [=job/job promise=] with a [=exception/create|new=] [=exception=] with |errorData| and a user agent-defined [=exception/message=], in |job|'s [=job/client=]'s [=environment settings object/Realm=].
2647+
1. If |job|'s [=job/client=] is not null, [=queue a task=], on |job|'s [=job/client=]'s [=responsible event loop=] using the [=DOM manipulation task source=], to reject |job|'s [=job/job promise=] with a [=exception/create|new=] [=exception=] with |errorData|, in |job|'s [=job/client=]'s [=environment settings object/Realm=].
26452648
1. For each |equivalentJob| in |job|'s [=list of equivalent jobs=]:
26462649
1. If |equivalentJob|'s [=job/client=] is null, [=iteration/continue=].
2647-
1. [=Queue a task=], on |equivalentJob|'s [=job/client=]'s [=responsible event loop=] using the [=DOM manipulation task source=], to reject |equivalentJob|'s [=job/job promise=] with a [=exception/create|new=] [=exception=] with |errorData| and a user agent-defined [=exception/message=], in |equivalentJob|'s [=job/client=]'s [=environment settings object/Realm=].
2650+
1. [=Queue a task=], on |equivalentJob|'s [=job/client=]'s [=responsible event loop=] using the [=DOM manipulation task source=], to reject |equivalentJob|'s [=job/job promise=] with a [=exception/create|new=] [=exception=] with |errorData|, in |equivalentJob|'s [=job/client=]'s [=environment settings object/Realm=].
26482651
</section>
26492652

26502653
<section algorithm>
@@ -2990,7 +2993,7 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
29902993
</section>
29912994

29922995
<section algorithm>
2993-
<h3 id="setup-serviceworkerglobalscope"><dfn>Setup ServiceWorkerGlobalScope</dfn></h3>
2996+
<h3 id="setup-serviceworkerglobalscope-algorithm"><dfn>Setup ServiceWorkerGlobalScope</dfn></h3>
29942997

29952998
: Input
29962999
:: |serviceWorker|, a [=/service worker=]
@@ -3114,7 +3117,7 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
31143117
1. Otherwise, set |callback| to the result of [=convert to an ECMAScript value|converting to an ECMAScript value=] |eventListenerCallback|.
31153118
1. If [$IsCallable$](|callback|) is false, then return false.
31163119

3117-
Note: [=Event listener/Callback=] objects that use {{handleEvent}} are assumed to be non-empty. This avoids calling the {{handleEvent}} getters, which could modify the event listeners during this check.
3120+
Note: [=event listener/Callback=] objects that use {{EventListener/handleEvent(event)}} are assumed to be non-empty. This avoids calling the {{EventListener/handleEvent(event)}} getters, which could modify the event listeners during this check.
31183121

31193122
1. If |callback|'s [=function body=] is not empty (i.e. either a [=statement=] or [=declaration=] exist), then return false.
31203123

@@ -3382,7 +3385,11 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
33823385
Note: Since running a user-defined regular expression has a security concern, it is prohibited.
33833386

33843387
1. Set |hasCondition| to true.
3385-
1. If |condition|["{{RouterCondition/requestMethod}}"] [=map/exists=], set |hasCondition| to true.
3388+
1. If |condition|["{{RouterCondition/requestMethod}}"] [=map/exists=]:
3389+
1. Let |method| be |condition|["{{RouterCondition/requestMethod}}"].
3390+
1. If |method| is not a [=/method=], then return false.
3391+
1. If |method| is a [=forbidden method=], then return false.
3392+
1. Set |hasCondition| to true.
33863393
1. If |condition|["{{RouterCondition/requestMode}}"] [=map/exists=], set |hasCondition| to true.
33873394
1. If |condition|["{{RouterCondition/requestDestination}}"] [=map/exists=], set |hasCondition| to true.
33883395
1. If |condition|["{{RouterCondition/runningStatus}}"] [=map/exists=], set |hasCondition| to true.
@@ -3434,6 +3441,7 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
34343441
1. If running [=match=] with |pattern| and |request|'s [=request/URL=] returns null, return false.
34353442
1. If |condition|["{{RouterCondition/requestMethod}}"] [=map/exists=], then:
34363443
1. Let |method| be |condition|["{{RouterCondition/requestMethod}}"].
3444+
1. [=method/Normalize=] |method|.
34373445
1. If |request|'s [=request/method=] is not |method|, return false.
34383446
1. If |condition|["{{RouterCondition/requestMode}}"] [=map/exists=], then:
34393447
1. Let |mode| be |condition|["{{RouterCondition/requestMode}}"].

0 commit comments

Comments
 (0)