Skip to content

Commit d89df71

Browse files
committed
Fix link to environment's id
1 parent 8b483b0 commit d89df71

File tree

4 files changed

+24
-26
lines changed

4 files changed

+24
-26
lines changed

docs/index.bs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/
158158
text: active service worker; for: environment
159159
text: dom manipulation task source
160160
text: environment
161+
text: id; for: environment
161162
text: run a classic script
162163
text: run a module script
163164
text: task queue; for: event loop
@@ -1113,7 +1114,7 @@ spec: url; urlPrefix: https://url.spec.whatwg.org/
11131114
<section>
11141115
<h4 id="client-id">{{Client/id}}</h4>
11151116

1116-
<p>The <dfn attribute for="Client" id="client-id-attribute"><code>id</code></dfn> attribute <em class="rfc2119" title="MUST">must</em> return its associated <a href="#dfn-service-worker-client-client">service worker client</a>'s <a>id</a>.</p>
1117+
<p>The <dfn attribute for="Client" id="client-id-attribute"><code>id</code></dfn> attribute <em class="rfc2119" title="MUST">must</em> return its associated <a href="#dfn-service-worker-client-client">service worker client</a>'s <a for="environment">id</a>.</p>
11171118
</section>
11181119

11191120
<section algorithm="client-postmessage">
@@ -1268,7 +1269,7 @@ spec: url; urlPrefix: https://url.spec.whatwg.org/
12681269
<ol>
12691270
<li>For each <a href="#dfn-service-worker-client">service worker client</a> <var>client</var> whose <a for="resource">origin</a> is the <a lt="same origin">same</a> as the associated <a href="#dfn-service-worker-global-scope-service-worker">service worker</a>'s <a for="resource">origin</a>:
12701271
<ol>
1271-
<li>If <var>client</var>'s <a>id</a> is <var>id</var>, then:
1272+
<li>If <var>client</var>'s <a for="environment">id</a> is <var>id</var>, then:
12721273
<ol>
12731274
<li>If <var>client</var> is not a <a>secure context</a>, reject <var>promise</var> with a "{{SecurityError}}" exception and abort these steps.</li>
12741275
<li>If <var>client</var> is a <a href="#dfn-window-client">window client</a>, then:
@@ -3563,8 +3564,8 @@ spec: url; urlPrefix: https://url.spec.whatwg.org/
35633564
<ol>
35643565
<li>Create a trusted event <var>e</var> that uses the {{FetchEvent}} interface, with the event type <code><a href="#service-worker-global-scope-fetch-event">fetch</a></code>, which does not bubble.</li>
35653566
<li>Let the <a href="#fetch-event-request-attribute">request</a> attribute of <var>e</var> be initialized to <var>r</var>.</li>
3566-
<li>Initialize <var>e</var>'s {{FetchEvent/clientId}} attribute to <var>client</var>'s <a>id</a>.</li>
3567-
<li>If <var>request</var> is a <a>non-subresource request</a> and <var>request</var>'s <a for="request">destination</a> is not "<code>report</code>", initialize <var>e</var>'s {{FetchEvent/reservedClientId}} attribute to <var>reservedClient</var>'s <a>id</a>, and to the empty string otherwise.</li>
3567+
<li>Initialize <var>e</var>'s {{FetchEvent/clientId}} attribute to <var>client</var>'s <a for="environment">id</a>.</li>
3568+
<li>If <var>request</var> is a <a>non-subresource request</a> and <var>request</var>'s <a for="request">destination</a> is not "<code>report</code>", initialize <var>e</var>'s {{FetchEvent/reservedClientId}} attribute to <var>reservedClient</var>'s <a for="environment">id</a>, and to the empty string otherwise.</li>
35683569
<li>If <var>request</var> is a <a>navigation request</a>, initialize <var>e</var>'s {{FetchEvent/targetClientId}} attribute to <var>request</var>'s <a for="request">target client id</a>, and to the empty string otherwise.</li>
35693570
<li>Let the <a href="#fetch-event-isreload-attribute">isReload</a> attribute of <var>e</var> be initialized to <code>true</code> if <var>request</var>'s <a for="request">client</a> is a <a href="#dfn-window-client">window client</a> and the event was dispatched with the user's intention for the page reload, and <code>false</code> otherwise.</li>
35703571
<li><a>Dispatch</a> <var>e</var> at <var>activeWorker</var>'s <a>environment settings object</a>'s <a for="environment settings object">global object</a>.</li>

docs/index.html

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2430,7 +2430,7 @@ <h4 class="heading settled" data-level="4.2.2" id="client-frametype"><span class
24302430
</section>
24312431
<section>
24322432
<h4 class="heading settled" data-level="4.2.3" id="client-id"><span class="secno">4.2.3. </span><span class="content"><code class="idl"><a data-link-type="idl" href="#client-id-attribute" id="ref-for-client-id-attribute-2">id</a></code></span><a class="self-link" href="#client-id"></a></h4>
2433-
<p>The <dfn class="dfn-paneled idl-code" data-dfn-for="Client" data-dfn-type="attribute" data-export="" id="client-id-attribute"><code>id</code></dfn> attribute <em class="rfc2119" title="MUST">must</em> return its associated <a href="#dfn-service-worker-client-client" id="ref-for-dfn-service-worker-client-client-3">service worker client</a>’s <a data-link-type="dfn" href="#dfn-service-worker-id" id="ref-for-dfn-service-worker-id-1">id</a>.</p>
2433+
<p>The <dfn class="dfn-paneled idl-code" data-dfn-for="Client" data-dfn-type="attribute" data-export="" id="client-id-attribute"><code>id</code></dfn> attribute <em class="rfc2119" title="MUST">must</em> return its associated <a href="#dfn-service-worker-client-client" id="ref-for-dfn-service-worker-client-client-3">service worker client</a>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#id">id</a>.</p>
24342434
</section>
24352435
<section class="algorithm" data-algorithm="client-postmessage">
24362436
<h4 class="heading settled" data-level="4.2.4" id="client-postmessage"><span class="secno">4.2.4. </span><span class="content"><code class="idl"><a data-link-type="idl" href="#client-postmessage-method" id="ref-for-client-postmessage-method-2">postMessage(message, transfer)</a></code></span><a class="self-link" href="#client-postmessage"></a></h4>
@@ -2566,7 +2566,7 @@ <h4 class="heading settled" data-level="4.3.1" id="clients-get"><span class="sec
25662566
For each <a href="#dfn-service-worker-client" id="ref-for-dfn-service-worker-client-24">service worker client</a> <var>client</var> whose <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#origin-2">origin</a> is the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#same-origin">same</a> as the associated <a href="#dfn-service-worker-global-scope-service-worker" id="ref-for-dfn-service-worker-global-scope-service-worker-7">service worker</a>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#origin-2">origin</a>:
25672567
<ol>
25682568
<li>
2569-
If <var>client</var>’s <a data-link-type="dfn" href="#dfn-service-worker-id" id="ref-for-dfn-service-worker-id-2">id</a> is <var>id</var>, then:
2569+
If <var>client</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#id">id</a> is <var>id</var>, then:
25702570
<ol>
25712571
<li>If <var>client</var> is not a <a data-link-type="dfn" href="https://w3c.github.io/webappsec-secure-contexts/#secure-context">secure context</a>, reject <var>promise</var> with a "<code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#securityerror">SecurityError</a></code>" exception and abort these steps.
25722572
<li>
@@ -4295,7 +4295,7 @@ <h3 class="heading settled" id="update-algorithm"><span class="content">Update</
42954295
Else:
42964296
<ol>
42974297
<li>Let <var>worker</var> be a new <a href="#dfn-service-worker" id="ref-for-dfn-service-worker-100">service worker</a>.
4298-
<li>Generate a unique opaque string and set <var>worker</var>’s <a href="#dfn-service-worker-id" id="ref-for-dfn-service-worker-id-3">id</a> to the value.
4298+
<li>Generate a unique opaque string and set <var>worker</var>’s <a href="#dfn-service-worker-id" id="ref-for-dfn-service-worker-id-1">id</a> to the value.
42994299
<li>Set <var>worker</var>’s <a href="#dfn-script-url" id="ref-for-dfn-script-url-6">script url</a> to <var>job</var>’s <a href="#dfn-job-script-url" id="ref-for-dfn-job-script-url-12">script url</a>, <var>worker</var>’s <a href="#dfn-script-resource" id="ref-for-dfn-script-resource-7">script resource</a> to <var>script</var>, and <var>worker</var>’s <a href="#dfn-type" id="ref-for-dfn-type-2">type</a> to <var>job</var>’s <a data-link-type="dfn" href="#dfn-job-worker-type" id="ref-for-dfn-job-worker-type-5">worker type</a>.
43004300
<li>Set <var>worker</var>’s <a href="#dfn-script-resource" id="ref-for-dfn-script-resource-8">script resource</a>’s <a href="#dfn-https-state" id="ref-for-dfn-https-state-1">HTTPS state</a> to <var>httpsState</var>.
43014301
<li>Set <var>worker</var>’s <a href="#dfn-script-resource" id="ref-for-dfn-script-resource-9">script resource</a>’s <a href="#dfn-referrer-policy" id="ref-for-dfn-referrer-policy-1">referrer policy</a> to <var>referrerPolicy</var>.
@@ -4596,8 +4596,8 @@ <h3 class="heading settled" id="on-fetch-request-algorithm"><span class="content
45964596
<ol>
45974597
<li>Create a trusted event <var>e</var> that uses the <code class="idl"><a data-link-type="idl" href="#fetch-event-interface" id="ref-for-fetch-event-interface-6">FetchEvent</a></code> interface, with the event type <code><a href="#service-worker-global-scope-fetch-event" id="ref-for-service-worker-global-scope-fetch-event-7">fetch</a></code>, which does not bubble.
45984598
<li>Let the <a href="#fetch-event-request-attribute" id="ref-for-fetch-event-request-attribute-3">request</a> attribute of <var>e</var> be initialized to <var>r</var>.
4599-
<li>Initialize <var>e</var>’s <code class="idl"><a data-link-type="idl" href="#fetch-event-clientid-attribute" id="ref-for-fetch-event-clientid-attribute-3">clientId</a></code> attribute to <var>client</var>’s <a data-link-type="dfn" href="#dfn-service-worker-id" id="ref-for-dfn-service-worker-id-4">id</a>.
4600-
<li>If <var>request</var> is a <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#non-subresource-request">non-subresource request</a> and <var>request</var>’s <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-request-destination">destination</a> is not "<code>report</code>", initialize <var>e</var>’s <code class="idl"><a data-link-type="idl" href="#fetch-event-reservedclientid-attribute" id="ref-for-fetch-event-reservedclientid-attribute-3">reservedClientId</a></code> attribute to <var>reservedClient</var>’s <a data-link-type="dfn" href="#dfn-service-worker-id" id="ref-for-dfn-service-worker-id-5">id</a>, and to the empty string otherwise.
4599+
<li>Initialize <var>e</var>’s <code class="idl"><a data-link-type="idl" href="#fetch-event-clientid-attribute" id="ref-for-fetch-event-clientid-attribute-3">clientId</a></code> attribute to <var>client</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#id">id</a>.
4600+
<li>If <var>request</var> is a <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#non-subresource-request">non-subresource request</a> and <var>request</var>’s <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-request-destination">destination</a> is not "<code>report</code>", initialize <var>e</var>’s <code class="idl"><a data-link-type="idl" href="#fetch-event-reservedclientid-attribute" id="ref-for-fetch-event-reservedclientid-attribute-3">reservedClientId</a></code> attribute to <var>reservedClient</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#id">id</a>, and to the empty string otherwise.
46014601
<li>If <var>request</var> is a <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#navigation-request">navigation request</a>, initialize <var>e</var>’s <code class="idl"><a data-link-type="idl" href="#fetch-event-targetClientid-attribute" id="ref-for-fetch-event-targetClientid-attribute-3">targetClientId</a></code> attribute to <var>request</var>’s <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-request-target-client-id">target client id</a>, and to the empty string otherwise.
46024602
<li>Let the <a href="#fetch-event-isreload-attribute" id="ref-for-fetch-event-isreload-attribute-3">isReload</a> attribute of <var>e</var> be initialized to <code>true</code> if <var>request</var>’s <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-request-client">client</a> is a <a href="#dfn-window-client" id="ref-for-dfn-window-client-9">window client</a> and the event was dispatched with the user’s intention for the page reload, and <code>false</code> otherwise.
46034603
<li><a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-dispatch">Dispatch</a> <var>e</var> at <var>activeWorker</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object">environment settings object</a>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-global">global object</a>.
@@ -5960,6 +5960,7 @@ <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span cla
59605960
<li><a href="https://html.spec.whatwg.org/multipage/semantics.html#attr-link-href">href</a>
59615961
<li><a href="https://html.spec.whatwg.org/multipage/workers.html#concept-workerglobalscope-https-state">https state <small>(for WorkerGlobalScope)</small></a>
59625962
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#https-state">https state <small>(for environment settings object)</small></a>
5963+
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#id">id</a>
59635964
<li><a href="https://html.spec.whatwg.org/multipage/workers.html#import-scripts-into-worker-global-scope">import scripts into worker global scope</a>
59645965
<li><a href="https://html.spec.whatwg.org/multipage/workers.html#dom-workerglobalscope-importscripts">importScripts(urls)</a>
59655966
<li><a href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel">in parallel</a>
@@ -6502,10 +6503,7 @@ <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content
65026503
<aside class="dfn-panel" data-for="dfn-service-worker-id">
65036504
<b><a href="#dfn-service-worker-id">#dfn-service-worker-id</a></b><b>Referenced in:</b>
65046505
<ul>
6505-
<li><a href="#ref-for-dfn-service-worker-id-1">4.2.3. id</a>
6506-
<li><a href="#ref-for-dfn-service-worker-id-2">4.3.1. get(id)</a>
6507-
<li><a href="#ref-for-dfn-service-worker-id-3">Update</a>
6508-
<li><a href="#ref-for-dfn-service-worker-id-4">Handle Fetch</a> <a href="#ref-for-dfn-service-worker-id-5">(2)</a>
6506+
<li><a href="#ref-for-dfn-service-worker-id-1">Update</a>
65096507
</ul>
65106508
</aside>
65116509
<aside class="dfn-panel" data-for="dfn-lifecycle-events">

docs/v1/index.bs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/
149149
text: active service worker; for: environment
150150
text: dom manipulation task source
151151
text: environment
152+
text: id; for: environment
152153
text: run a classic script
153154
text: run a module script
154155
text: task queue; for: event loop
@@ -1101,7 +1102,7 @@ spec: url; urlPrefix: https://url.spec.whatwg.org/
11011102
<section>
11021103
<h4 id="client-id">{{Client/id}}</h4>
11031104

1104-
<p>The <dfn attribute for="Client" id="client-id-attribute"><code>id</code></dfn> attribute <em class="rfc2119" title="MUST">must</em> return its associated <a href="#dfn-service-worker-client-client">service worker client</a>'s <a>id</a>.</p>
1105+
<p>The <dfn attribute for="Client" id="client-id-attribute"><code>id</code></dfn> attribute <em class="rfc2119" title="MUST">must</em> return its associated <a href="#dfn-service-worker-client-client">service worker client</a>'s <a for="environment">id</a>.</p>
11051106
</section>
11061107

11071108
<section algorithm="client-postmessage">
@@ -1256,7 +1257,7 @@ spec: url; urlPrefix: https://url.spec.whatwg.org/
12561257
<ol>
12571258
<li>For each <a href="#dfn-service-worker-client">service worker client</a> <var>client</var> whose <a for="resource">origin</a> is the <a lt="same origin">same</a> as the associated <a href="#dfn-service-worker-global-scope-service-worker">service worker</a>'s <a for="resource">origin</a>:
12581259
<ol>
1259-
<li>If <var>client</var>'s <a>id</a> is <var>id</var>, then:
1260+
<li>If <var>client</var>'s <a for="environment">id</a> is <var>id</var>, then:
12601261
<ol>
12611262
<li>If <var>client</var> is not a <a>secure context</a>, reject <var>promise</var> with a "{{SecurityError}}" exception and abort these steps.</li>
12621263
<li>If <var>client</var> is a <a href="#dfn-window-client">window client</a>, then:
@@ -3229,8 +3230,8 @@ spec: url; urlPrefix: https://url.spec.whatwg.org/
32293230
<ol>
32303231
<li>Create a trusted event <var>e</var> that uses the {{FetchEvent}} interface, with the event type <code><a href="#service-worker-global-scope-fetch-event">fetch</a></code>, which does not bubble.</li>
32313232
<li>Let the <a href="#fetch-event-request-attribute">request</a> attribute of <var>e</var> be initialized to <var>r</var>.</li>
3232-
<li>Initialize <var>e</var>'s {{FetchEvent/clientId}} attribute to <var>client</var>'s <a>id</a>.</li>
3233-
<li>If <var>request</var> is a <a>non-subresource request</a> and <var>request</var>'s <a for="request">destination</a> is not "<code>report</code>", initialize <var>e</var>'s {{FetchEvent/reservedClientId}} attribute to <var>reservedClient</var>'s <a>id</a>, and to the empty string otherwise.</li>
3233+
<li>Initialize <var>e</var>'s {{FetchEvent/clientId}} attribute to <var>client</var>'s <a for="environment">id</a>.</li>
3234+
<li>If <var>request</var> is a <a>non-subresource request</a> and <var>request</var>'s <a for="request">destination</a> is not "<code>report</code>", initialize <var>e</var>'s {{FetchEvent/reservedClientId}} attribute to <var>reservedClient</var>'s <a for="environment">id</a>, and to the empty string otherwise.</li>
32343235
<li>If <var>request</var> is a <a>navigation request</a>, initialize <var>e</var>'s {{FetchEvent/targetClientId}} attribute to <var>request</var>'s <a>target client id</a>, and to the empty string otherwise.</li>
32353236
<li>Let the <a href="#fetch-event-isreload-attribute">isReload</a> attribute of <var>e</var> be initialized to <code>true</code> if <var>request</var>'s <a for="request">client</a> is a <a href="#dfn-window-client">window client</a> and the event was dispatched with the user's intention for the page reload, and <code>false</code> otherwise.</li>
32363237
<li><a>Dispatch</a> <var>e</var> at <var>activeWorker</var>'s <a>environment settings object</a>'s <a for="environment settings object">global object</a>.</li>

0 commit comments

Comments
 (0)