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
<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>:
1270
1271
<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:
1272
1273
<ol>
1273
1274
<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>
1274
1275
<li>If <var>client</var> is a <a href="#dfn-window-client">window client</a>, then:
<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>
3565
3566
<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>
3568
3569
<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>
3569
3570
<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>
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>:
2567
2567
<ol>
2568
2568
<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:
2570
2570
<ol>
2571
2571
<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.
<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.
4299
4299
<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>.
<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.
4598
4598
<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>.
<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.
<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.
4601
4601
<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.
4602
4602
<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.
<li><a href="https://html.spec.whatwg.org/multipage/workers.html#concept-workerglobalscope-https-state">https state <small>(for WorkerGlobalScope)</small></a>
5962
5962
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#https-state">https state <small>(for environment settings object)</small></a>
<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>:
1258
1259
<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:
1260
1261
<ol>
1261
1262
<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>
1262
1263
<li>If <var>client</var> is a <a href="#dfn-window-client">window client</a>, then:
<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>
3231
3232
<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>
3234
3235
<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>
3235
3236
<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>
0 commit comments