Skip to content

Commit ae0a84d

Browse files
jungkeesjakearchibald
authored andcommitted
Leave notes on service worker script fetching for V1 (w3c#1450)
The Update algorithm step 9 has two issues: - Using to-be-created environment settings object instead of a concrete environment settings object - Passing null value of job's client to the fetch a script algorithms in HTML This change leaves notes on these issues to track them in the nightly version and moves them to the Version 2 milestone in the github repository. For w3c#1013.
1 parent 211d2ca commit ae0a84d

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

docs/index.bs

+4
Original file line numberDiff line numberDiff line change
@@ -2526,6 +2526,10 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
25262526
: "<code>module</code>"
25272527
:: <a>Fetch a module worker script graph</a> given |job|’s <a lt="URL serializer">serialized</a> [=job/script url=], |job|’s [=job/client=], "<code>serviceworker</code>", "<code>omit</code>", and the to-be-created <a>environment settings object</a> for this service worker.
25282528

2529+
Issue: Using the to-be-created [=environment settings object=] rather than a concrete [=environment settings object=]. This is used due to the unique processing model of service workers compared to the processing model of other [=web workers=]. The script fetching algorithms of HTML standard originally designed for other [=web workers=] require an [=environment settings object=] of the execution environment, but service workers fetch a script separately in the [=Update=] algorithm before the script later runs multiple times through the [=Run Service Worker=] algorithm.
2530+
2531+
Issue: The [=fetch a classic worker script=] algorithm and the [=fetch a module worker script graph=] algorithm in HTML take |job|’s [=job/client=] as an argument. |job|’s [=job/client=] is null when passed from the [=Soft Update=] algorithm.
2532+
25292533
To [=fetching scripts/perform the fetch=] given |request|, run the following steps:
25302534

25312535
1. Append \`<code>Service-Worker</code>\`/\`<code>script</code>\` to |request|'s [=request/header list=].

docs/v1/index.bs

+7
Original file line numberDiff line numberDiff line change
@@ -2350,6 +2350,13 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
23502350
: "<code>module</code>"
23512351
:: <a>Fetch a module worker script graph</a> given |job|’s <a lt="URL serializer">serialized</a> [=job/script url=], |job|’s [=job/client=], "<code>serviceworker</code>", "<code>omit</code>", and the to-be-created <a>environment settings object</a> for this service worker.
23522352

2353+
<div class="note">
2354+
<p>Note: This step has two known issues.</p>
2355+
<p>First, using the to-be-created [=environment settings object=] rather than a concrete [=environment settings object=]. This is used due to the unique processing model of service workers compared to the processing model of other [=web workers=]. The script fetching algorithms of HTML standard originally designed for other [=web workers=] require an [=environment settings object=] of the execution environment, but service workers fetch a script separately in the [=Update=] algorithm before the script later runs multiple times through the [=Run Service Worker=] algorithm.</p>
2356+
<p>Second, the [=fetch a classic worker script=] algorithm and the [=fetch a module worker script graph=] algorithm in HTML take |job|’s [=job/client=] as an argument. |job|’s [=job/client=] is null when passed from the [=Soft Update=] algorithm.</p>
2357+
<p>These issues are tracked in the [issue #1013](https://github.com/w3c/ServiceWorker/issues/1013) of the ServiceWorkers GitHub repository. We will address these issues in [Service Workers Nightly](https://w3c.github.io/ServiceWorker/).</p>
2358+
</div>
2359+
23532360
To [=fetching scripts/perform the fetch=] given |request|, run the following steps:
23542361

23552362
1. Append \`<code>Service-Worker</code>\`/\`<code>script</code>\` to |request|'s [=request/header list=].

0 commit comments

Comments
 (0)