-
Notifications
You must be signed in to change notification settings - Fork 313
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
11 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ Editor: Jake Archibald, Google, [email protected] | |
Editor: Marijn Kruisselbrink, Google, [email protected] | ||
Repository: w3c/ServiceWorker | ||
Group: webplatform | ||
!Tests: <a href=https://github.com/w3c/web-platform-tests/tree/master/service-workers>web-platform-tests service-workers/</a> (<a href=https://github.com/w3c/web-platform-tests/labels/service-workers>ongoing work</a>) | ||
Abstract: This specification describes a method that enables applications to take advantage of persistent background processing, including hooks to enable bootstrapping of web applications while offline. | ||
Abstract: | ||
Abstract: The core of this system is an event-driven <a>Web Worker</a>, which responds to events dispatched from documents and other sources. A system for managing installation, versions, and upgrades is provided. | ||
|
@@ -142,7 +143,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe | |
A [=/service worker=] has an associated <dfn export id="dfn-service-worker-id">id</dfn> (an opaque string), which uniquely identifies itself during the lifetime of its <a>containing service worker registration</a>. | ||
|
||
A [=/service worker=] has an associated <dfn export id="dfn-service-worker-global-object" for="service worker">global object</dfn> (a {{ServiceWorkerGlobalScope}} object or null). | ||
|
||
A [=/service worker=] is dispatched a set of <dfn export id="dfn-lifecycle-events">lifecycle events</dfn>, {{install!!event}} and {{activate!!event}}, and <dfn export id="dfn-functional-events">functional events</dfn> including {{fetch!!event}}. | ||
|
||
A [=/service worker=] has an associated <dfn export id="dfn-script-resource">script resource</dfn> (a <a>script</a>), which represents its own script resource. It is initially set to null. | ||
|
@@ -331,7 +332,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe | |
|
||
The <dfn method for="ServiceWorker"><code>postMessage(|message|, |transfer|)</code></dfn> method *must* run these steps: | ||
|
||
1. If the {{ServiceWorker/state}} attribute value of the <a>context object</a> is {{"redundant"}}, <a>throw</a> an "{{InvalidStateError}}" exception and abort these steps. | ||
1. If the {{ServiceWorker/state}} attribute value of the <a>context object</a> is {{"redundant"}}, <a>throw</a> an "{{InvalidStateError}}" exception and abort these steps. | ||
1. Let |serviceWorker| be the [=/service worker=] represented by the <a>context object</a>. | ||
1. Invoke <a>Run Service Worker</a> algorithm with |serviceWorker| as the argument. | ||
1. Let |incumbentSettings| be the <a>incumbent settings object</a>, and |incumbentGlobal| its [=environment settings object/global object=]. | ||
|
@@ -573,9 +574,9 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe | |
1. Run the following substeps <a>in parallel</a>: | ||
1. *CheckRegistration*: If the result of running <a>Match Service Worker Registration</a> algorithm with |clientURL| as its argument is not null, then: | ||
1. Set |registration| to the result value. | ||
1. Else: | ||
1. Else: | ||
1. Wait until <a>scope to registration map</a> has a new entry. | ||
1. Jump to the step labeled *CheckRegistration*. | ||
1. Jump to the step labeled *CheckRegistration*. | ||
1. If |registration|'s <a>active worker</a> is null, wait until |registration|'s <a>active worker</a> changes. | ||
|
||
Note: Implementers should consider this condition is met when the corresponding registration request gets to the step 6 of <a>Activate</a> algorithm. | ||
|
@@ -1650,9 +1651,9 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe | |
1. Let |varyHeaders| be the array containing the elements corresponding to the [=http/field-values=] of the <a>Vary</a> header. | ||
1. Let |matchAsterisk| be false. | ||
1. For each |f| in |varyHeaders|: | ||
1. If |f| matches "<code>*</code>", set |matchAsterisk| to true and break the loop. | ||
1. If |f| matches "<code>*</code>", set |matchAsterisk| to true and break the loop. | ||
1. If |matchAsterisk| is true, reject |responsePromise| with a <code>TypeError</code>. | ||
1. Else, resolve |responsePromise| with a new {{Response}} object associated with |response| and a new {{Headers}} object whose <a>guard</a> is "<code>immutable</code>". | ||
1. Else, resolve |responsePromise| with a new {{Response}} object associated with |response| and a new {{Headers}} object whose <a>guard</a> is "<code>immutable</code>". | ||
1. Else, resolve |responsePromise| with a new {{Response}} object associated with |response| and a new {{Headers}} object whose <a>guard</a> is "<code>immutable</code>". | ||
|
||
Note: This step ensures that the promise for this fetch resolves as soon as the response's headers become available. | ||
|
@@ -3130,7 +3131,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe | |
|
||
Anne van Kesteren has generously lent his encyclopedic knowledge of Web Platform arcana and standards development experience throughout the development of the service worker. This specification would be incomplete without his previous work in describing the real-world behavior of URLs, HTTP Fetch, Promises, and DOM. Similarly, this specification would not be possible without Ian Hickson's rigorous Web Worker spec. Much thanks to him. | ||
|
||
In no particular order, deep gratitude for design guidance and discussion goes to: Jungkee Song, Alec Flett, David Barrett-Kahn, Aaron Boodman, Michael Nordman, Tom Ashworth, Kinuko Yasuda, Darin Fisher, Jonas Sicking, Jesús Leganés Combarro, Mark Christian, Dave Hermann, Yehuda Katz, François Remy, Ilya Grigorik, Will Chan, Domenic Denicola, Nikhil Marathe, Yves Lafon, Adam Barth, Greg Simon, Devdatta Akhawe, Dominic Cooney, Jeffrey Yasskin, Joshua Bell, Boris Zbarsky, Matt Falkenhagen, Tobie Langel, Gavin Peters, Ben Kelly, Hiroki Nakagawa, Jake Archibald, Josh Soref, Jinho Bang, Yutaka Hirano, isonmad, and Ali Alabbas. | ||
In no particular order, deep gratitude for design guidance and discussion goes to: Jungkee Song, Alec Flett, David Barrett-Kahn, Aaron Boodman, Michael Nordman, Tom Ashworth, Kinuko Yasuda, Darin Fisher, Jonas Sicking, Jesús Leganés Combarro, Mark Christian, Dave Hermann, Yehuda Katz, François Remy, Ilya Grigorik, Will Chan, Domenic Denicola, Nikhil Marathe, Yves Lafon, Adam Barth, Greg Simon, Devdatta Akhawe, Dominic Cooney, Jeffrey Yasskin, Joshua Bell, Boris Zbarsky, Matt Falkenhagen, Tobie Langel, Gavin Peters, Ben Kelly, Hiroki Nakagawa, Jake Archibald, Josh Soref, Jinho Bang, Yutaka Hirano, isonmad, Ali Alabbas, and Philip Jägenstedt. | ||
|
||
Jason Weber, Chris Wilson, Paul Kinlan, Ehsan Akhgari, and Daniel Austin have provided valuable, well-timed feedback on requirements and the standardization process. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1440,6 +1440,8 @@ <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="cont | |
<dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:[email protected]">Jungkee Song</a> (<span class="p-org org">Samsung Electronics</span>) | ||
<dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:[email protected]">Jake Archibald</a> (<span class="p-org org">Google</span>) | ||
<dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:[email protected]">Marijn Kruisselbrink</a> (<span class="p-org org">Google</span>) | ||
<dt>Tests: | ||
<dd><span><a href="https://github.com/w3c/web-platform-tests/tree/master/service-workers">web-platform-tests service-workers/</a> (<a href="https://github.com/w3c/web-platform-tests/labels/service-workers">ongoing work</a>)</span> | ||
</dl> | ||
</div> | ||
<div data-fill-with="warning"></div> | ||
|
@@ -5863,7 +5865,7 @@ <h3 class="heading settled" id="syntax"><span class="content">Syntax</span><a cl | |
<h2 class="heading settled" data-level="8" id="acknowledgements"><span class="secno">8. </span><span class="content">Acknowledgements</span><a class="self-link" href="#acknowledgements"></a></h2> | ||
<p>Deep thanks go to Andrew Betts for organizing and hosting a small workshop of like-minded individuals including: Jake Archibald, Jackson Gabbard, Tobie Langel, Robin Berjon, Patrick Lauke, Christian Heilmann. From the clarity of the day’s discussions and the use-cases outlined there, much has become possible. Further thanks to Andrew for raising consciousness about the offline problem. His organization of EdgeConf and inclusion of Offline as a persistent topic there has created many opportunities and connections that have enabled this work to progress.</p> | ||
<p>Anne van Kesteren has generously lent his encyclopedic knowledge of Web Platform arcana and standards development experience throughout the development of the service worker. This specification would be incomplete without his previous work in describing the real-world behavior of URLs, HTTP Fetch, Promises, and DOM. Similarly, this specification would not be possible without Ian Hickson’s rigorous Web Worker spec. Much thanks to him.</p> | ||
<p>In no particular order, deep gratitude for design guidance and discussion goes to: Jungkee Song, Alec Flett, David Barrett-Kahn, Aaron Boodman, Michael Nordman, Tom Ashworth, Kinuko Yasuda, Darin Fisher, Jonas Sicking, Jesús Leganés Combarro, Mark Christian, Dave Hermann, Yehuda Katz, François Remy, Ilya Grigorik, Will Chan, Domenic Denicola, Nikhil Marathe, Yves Lafon, Adam Barth, Greg Simon, Devdatta Akhawe, Dominic Cooney, Jeffrey Yasskin, Joshua Bell, Boris Zbarsky, Matt Falkenhagen, Tobie Langel, Gavin Peters, Ben Kelly, Hiroki Nakagawa, Jake Archibald, Josh Soref, Jinho Bang, Yutaka Hirano, isonmad, and Ali Alabbas.</p> | ||
<p>In no particular order, deep gratitude for design guidance and discussion goes to: Jungkee Song, Alec Flett, David Barrett-Kahn, Aaron Boodman, Michael Nordman, Tom Ashworth, Kinuko Yasuda, Darin Fisher, Jonas Sicking, Jesús Leganés Combarro, Mark Christian, Dave Hermann, Yehuda Katz, François Remy, Ilya Grigorik, Will Chan, Domenic Denicola, Nikhil Marathe, Yves Lafon, Adam Barth, Greg Simon, Devdatta Akhawe, Dominic Cooney, Jeffrey Yasskin, Joshua Bell, Boris Zbarsky, Matt Falkenhagen, Tobie Langel, Gavin Peters, Ben Kelly, Hiroki Nakagawa, Jake Archibald, Josh Soref, Jinho Bang, Yutaka Hirano, isonmad, Ali Alabbas, and Philip Jägenstedt.</p> | ||
<p>Jason Weber, Chris Wilson, Paul Kinlan, Ehsan Akhgari, and Daniel Austin have provided valuable, well-timed feedback on requirements and the standardization process.</p> | ||
<p>The authors would also like to thank Dimitri Glazkov for his scripts and formatting tools which have been essential in the production of this specification. The authors are also grateful for his considerable guidance.</p> | ||
<p>Thanks also to Vivian Cromwell, Greg Simon, Alex Komoroske, Wonsuk Lee, and Seojin Kim for their considerable professional support.</p> | ||
|