Skip to content

Commit

Permalink
Remove links to promise resolve to avoid ambiguity of multiple dfns
Browse files Browse the repository at this point in the history
  • Loading branch information
jungkees committed Feb 23, 2018
1 parent 5230c70 commit b695958
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 34 deletions.
12 changes: 6 additions & 6 deletions docs/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
1. [=Queue a task=] on |promise|'s [=relevant settings object=]'s [=responsible event loop=], using the [=DOM manipulation task source=], to run the following steps:
1. Let |registrationObjects| be a new [=list=].
1. [=list/For each=] |registration| of |registrations|, [=append=] the {{ServiceWorkerRegistration}} object associated with |registration| to |registrationObjects|.
1. [=Resolve=] |promise| with [=create a frozen array|a new frozen array of=] |registrationObjects| in |promise|'s [=relevant Realm=].
1. Resolve |promise| with [=create a frozen array|a new frozen array of=] |registrationObjects| in |promise|'s [=relevant Realm=].
1. Return |promise|.
</section>

Expand Down Expand Up @@ -793,7 +793,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
1. Let |registration| be the [=context object=]'s associated [=/service worker registration=].
1. If |registration|'s [=active worker=] is null, [=reject=] |promise| with an "{{InvalidStateError}}" {{DOMException}}, and abort these steps.
1. Set |registration|'s [=navigation preload enabled flag=].
1. [=Resolve=] |promise| with undefined.
1. Resolve |promise| with undefined.
</section>

<section algorithm="navigation-preload-manager-disable">
Expand All @@ -804,7 +804,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
1. Let |registration| be the [=context object=]'s associated [=/service worker registration=].
1. If |registration|'s [=active worker=] is null, [=reject=] |promise| with an "{{InvalidStateError}}" {{DOMException}}, and abort these steps.
1. Unset |registration|'s [=navigation preload enabled flag=].
1. [=Resolve=] |promise| with undefined.
1. Resolve |promise| with undefined.
</section>

<section algorithm="navigation-preload-manager-setheadervalue">
Expand All @@ -815,7 +815,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
1. Let |registration| be the [=context object=]'s associated [=/service worker registration=].
1. If |registration|'s [=active worker=] is null, [=reject=] |promise| with an "{{InvalidStateError}}" {{DOMException}}, and abort these steps.
1. Set |registration|'s [=navigation preload header value=] to |value|.
1. [=Resolve=] |promise| with undefined.
1. Resolve |promise| with undefined.
</section>

<section algorithm="navigation-preload-manager-getstate">
Expand All @@ -827,7 +827,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
1. Let |state| be a new {{NavigationPreloadState}} dictionary.
1. If |registration|'s [=navigation preload enabled flag=] is set, set |state|'s {{NavigationPreloadState/enabled}} dictionary member to true.
1. Set |state|'s {{NavigationPreloadState/headerValue}} dictionary member to the |registration|'s [=navigation preload header value=].
1. [=Resolve=] |promise| with |state|.
1. Resolve |promise| with |state|.
</section>

</section>
Expand Down Expand Up @@ -1236,7 +1236,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe

Note: [=Window clients=] are always placed before [=worker clients=].

1. [=Resolve=] |promise| with [=create a frozen array|a new frozen array of=] |clientObjects| in |promise|'s [=relevant Realm=].
1. Resolve |promise| with [=create a frozen array|a new frozen array of=] |clientObjects| in |promise|'s [=relevant Realm=].
1. Return |promise|.
</section>

Expand Down
23 changes: 8 additions & 15 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,7 @@
<link href="https://www.w3.org/StyleSheets/TR/2016/W3C-ED" rel="stylesheet" type="text/css">
<meta content="Bikeshed version ae5d415446a9edf0c07d32303ac1d21767d86d57" name="generator">
<link href="https://www.w3.org/TR/service-workers/" rel="canonical">
<meta content="49f954fc64222d5cd790dd5921fb9cb7b08ad8b0" name="document-revision">
<meta content="5230c70eaa3a622f981b8566431d90052a3ac2eb" name="document-revision">
<style>/* style-md-lists */

/* This is a weird hack for me not yet following the commonmark spec
Expand Down Expand Up @@ -2221,7 +2221,7 @@ <h4 class="heading settled" data-level="3.4.5" id="navigator-service-worker-getR
<li data-md="">
<p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-iterate" id="ref-for-list-iterate">For each</a> <var>registration</var> of <var>registrations</var>, <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-append" id="ref-for-list-append①">append</a> the <code class="idl"><a data-link-type="idl" href="#serviceworkerregistration" id="ref-for-serviceworkerregistration①①">ServiceWorkerRegistration</a></code> object associated with <var>registration</var> to <var>registrationObjects</var>.</p>
<li data-md="">
<p><a data-link-type="dfn" href="https://w3c.github.io/FileAPI/#blob-url-resolve" id="ref-for-blob-url-resolve">Resolve</a> <var>promise</var> with <a data-link-type="dfn" href="https://heycam.github.io/webidl/#dfn-create-frozen-array" id="ref-for-dfn-create-frozen-array">a new frozen array of</a> <var>registrationObjects</var> in <var>promise</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm">relevant Realm</a>.</p>
<p>Resolve <var>promise</var> with <a data-link-type="dfn" href="https://heycam.github.io/webidl/#dfn-create-frozen-array" id="ref-for-dfn-create-frozen-array">a new frozen array of</a> <var>registrationObjects</var> in <var>promise</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm">relevant Realm</a>.</p>
</ol>
</ol>
<li data-md="">
Expand Down Expand Up @@ -2323,7 +2323,7 @@ <h4 class="heading settled" data-level="3.6.1" id="navigation-preload-manager-en
<li data-md="">
<p>Set <var>registration</var>’s <a data-link-type="dfn" href="#service-worker-registration-navigation-preload-enabled-flag" id="ref-for-service-worker-registration-navigation-preload-enabled-flag">navigation preload enabled flag</a>.</p>
<li data-md="">
<p><a data-link-type="dfn" href="https://w3c.github.io/FileAPI/#blob-url-resolve" id="ref-for-blob-url-resolve①">Resolve</a> <var>promise</var> with undefined.</p>
<p>Resolve <var>promise</var> with undefined.</p>
</ol>
</section>
<section class="algorithm" data-algorithm="navigation-preload-manager-disable">
Expand All @@ -2337,7 +2337,7 @@ <h4 class="heading settled" data-level="3.6.2" id="navigation-preload-manager-di
<li data-md="">
<p>Unset <var>registration</var>’s <a data-link-type="dfn" href="#service-worker-registration-navigation-preload-enabled-flag" id="ref-for-service-worker-registration-navigation-preload-enabled-flag①">navigation preload enabled flag</a>.</p>
<li data-md="">
<p><a data-link-type="dfn" href="https://w3c.github.io/FileAPI/#blob-url-resolve" id="ref-for-blob-url-resolve②">Resolve</a> <var>promise</var> with undefined.</p>
<p>Resolve <var>promise</var> with undefined.</p>
</ol>
</section>
<section class="algorithm" data-algorithm="navigation-preload-manager-setheadervalue">
Expand All @@ -2351,7 +2351,7 @@ <h4 class="heading settled" data-level="3.6.3" id="navigation-preload-manager-se
<li data-md="">
<p>Set <var>registration</var>’s <a data-link-type="dfn" href="#service-worker-registration-navigation-preload-header-value" id="ref-for-service-worker-registration-navigation-preload-header-value">navigation preload header value</a> to <var>value</var>.</p>
<li data-md="">
<p><a data-link-type="dfn" href="https://w3c.github.io/FileAPI/#blob-url-resolve" id="ref-for-blob-url-resolve③">Resolve</a> <var>promise</var> with undefined.</p>
<p>Resolve <var>promise</var> with undefined.</p>
</ol>
</section>
<section class="algorithm" data-algorithm="navigation-preload-manager-getstate">
Expand All @@ -2367,7 +2367,7 @@ <h4 class="heading settled" data-level="3.6.4" id="navigation-preload-manager-ge
<li data-md="">
<p>Set <var>state</var>’s <code class="idl"><a data-link-type="idl" href="#dom-navigationpreloadstate-headervalue" id="ref-for-dom-navigationpreloadstate-headervalue">headerValue</a></code> dictionary member to the <var>registration</var>’s <a data-link-type="dfn" href="#service-worker-registration-navigation-preload-header-value" id="ref-for-service-worker-registration-navigation-preload-header-value①">navigation preload header value</a>.</p>
<li data-md="">
<p><a data-link-type="dfn" href="https://w3c.github.io/FileAPI/#blob-url-resolve" id="ref-for-blob-url-resolve④">Resolve</a> <var>promise</var> with <var>state</var>.</p>
<p>Resolve <var>promise</var> with <var>state</var>.</p>
</ol>
</section>
</section>
Expand Down Expand Up @@ -2908,7 +2908,7 @@ <h4 class="heading settled" data-level="4.3.2" id="clients-matchall"><span class
</ul>
<p class="note" role="note"><span>Note:</span> <a data-link-type="dfn" href="#dfn-window-client" id="ref-for-dfn-window-client⑤">Window clients</a> are always placed before <a data-link-type="dfn" href="#dfn-worker-client" id="ref-for-dfn-worker-client②">worker clients</a>.</p>
<li data-md="">
<p><a data-link-type="dfn" href="https://w3c.github.io/FileAPI/#blob-url-resolve" id="ref-for-blob-url-resolve⑤">Resolve</a> <var>promise</var> with <a data-link-type="dfn" href="https://heycam.github.io/webidl/#dfn-create-frozen-array" id="ref-for-dfn-create-frozen-array①">a new frozen array of</a> <var>clientObjects</var> in <var>promise</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm②">relevant Realm</a>.</p>
<p>Resolve <var>promise</var> with <a data-link-type="dfn" href="https://heycam.github.io/webidl/#dfn-create-frozen-array" id="ref-for-dfn-create-frozen-array①">a new frozen array of</a> <var>clientObjects</var> in <var>promise</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-realm" id="ref-for-concept-relevant-realm②">relevant Realm</a>.</p>
</ol>
</ol>
<li data-md="">
Expand Down Expand Up @@ -6059,7 +6059,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, Michael(tm) Smith, isonmad, Ali Alabbas, Philip Jägenstedt, and Mike Pennisi.</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, Michael(tm) Smith, isonmad, Ali Alabbas, Philip Jägenstedt, Mike Pennisi, and Eric Willigers.</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>
Expand Down Expand Up @@ -6640,11 +6640,6 @@ <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span cla
<li><a href="https://fetch.spec.whatwg.org/#concept-request-url">url</a>
<li><a href="https://fetch.spec.whatwg.org/#concept-header-value">value</a>
</ul>
<li>
<a data-link-type="biblio">[FileAPI]</a> defines the following terms:
<ul>
<li><a href="https://w3c.github.io/FileAPI/#blob-url-resolve">resolve</a>
</ul>
<li>
<a data-link-type="biblio">[HTML]</a> defines the following terms:
<ul>
Expand Down Expand Up @@ -6887,8 +6882,6 @@ <h3 class="no-num no-ref heading settled" id="normative"><span class="content">N
<dd><a href="https://tc39.github.io/ecma262/">ECMAScript Language Specification</a>. URL: <a href="https://tc39.github.io/ecma262/">https://tc39.github.io/ecma262/</a>
<dt id="biblio-fetch">[FETCH]
<dd>Anne van Kesteren. <a href="https://fetch.spec.whatwg.org/">Fetch Standard</a>. Living Standard. URL: <a href="https://fetch.spec.whatwg.org/">https://fetch.spec.whatwg.org/</a>
<dt id="biblio-fileapi">[FileAPI]
<dd>Marijn Kruisselbrink. <a href="https://www.w3.org/TR/FileAPI/">File API</a>. 26 October 2017. WD. URL: <a href="https://www.w3.org/TR/FileAPI/">https://www.w3.org/TR/FileAPI/</a>
<dt id="biblio-html">[HTML]
<dd>Anne van Kesteren; et al. <a href="https://html.spec.whatwg.org/multipage/">HTML Standard</a>. Living Standard. URL: <a href="https://html.spec.whatwg.org/multipage/">https://html.spec.whatwg.org/multipage/</a>
<dt id="biblio-infra">[INFRA]
Expand Down
4 changes: 2 additions & 2 deletions docs/v1/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
1. [=Queue a task=] on |promise|'s [=relevant settings object=]'s [=responsible event loop=], using the [=DOM manipulation task source=], to run the following steps:
1. Let |registrationObjects| be a new [=list=].
1. [=list/For each=] |registration| of |registrations|, [=append=] the {{ServiceWorkerRegistration}} object associated with |registration| to |registrationObjects|.
1. [=Resolve=] |promise| with [=create a frozen array|a new frozen array of=] |registrationObjects| in |promise|'s [=relevant Realm=].
1. Resolve |promise| with [=create a frozen array|a new frozen array of=] |registrationObjects| in |promise|'s [=relevant Realm=].
1. Return |promise|.
</section>

Expand Down Expand Up @@ -1174,7 +1174,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe

Note: [=Window clients=] are always placed before [=worker clients=].

1. [=Resolve=] |promise| with [=create a frozen array|a new frozen array of=] |clientObjects| in |promise|'s [=relevant Realm=].
1. Resolve |promise| with [=create a frozen array|a new frozen array of=] |clientObjects| in |promise|'s [=relevant Realm=].
1. Return |promise|.
</section>

Expand Down
Loading

0 comments on commit b695958

Please sign in to comment.