Skip to content

Commit b695958

Browse files
committed
Remove links to promise resolve to avoid ambiguity of multiple dfns
1 parent 5230c70 commit b695958

File tree

4 files changed

+20
-34
lines changed

4 files changed

+20
-34
lines changed

docs/index.bs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
664664
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:
665665
1. Let |registrationObjects| be a new [=list=].
666666
1. [=list/For each=] |registration| of |registrations|, [=append=] the {{ServiceWorkerRegistration}} object associated with |registration| to |registrationObjects|.
667-
1. [=Resolve=] |promise| with [=create a frozen array|a new frozen array of=] |registrationObjects| in |promise|'s [=relevant Realm=].
667+
1. Resolve |promise| with [=create a frozen array|a new frozen array of=] |registrationObjects| in |promise|'s [=relevant Realm=].
668668
1. Return |promise|.
669669
</section>
670670

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

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

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

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

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

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

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

docs/index.html

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,7 @@
11791179
<link href="https://www.w3.org/StyleSheets/TR/2016/W3C-ED" rel="stylesheet" type="text/css">
11801180
<meta content="Bikeshed version ae5d415446a9edf0c07d32303ac1d21767d86d57" name="generator">
11811181
<link href="https://www.w3.org/TR/service-workers/" rel="canonical">
1182-
<meta content="49f954fc64222d5cd790dd5921fb9cb7b08ad8b0" name="document-revision">
1182+
<meta content="5230c70eaa3a622f981b8566431d90052a3ac2eb" name="document-revision">
11831183
<style>/* style-md-lists */
11841184

11851185
/* This is a weird hack for me not yet following the commonmark spec
@@ -2221,7 +2221,7 @@ <h4 class="heading settled" data-level="3.4.5" id="navigator-service-worker-getR
22212221
<li data-md="">
22222222
<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>
22232223
<li data-md="">
2224-
<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>
2224+
<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>
22252225
</ol>
22262226
</ol>
22272227
<li data-md="">
@@ -2323,7 +2323,7 @@ <h4 class="heading settled" data-level="3.6.1" id="navigation-preload-manager-en
23232323
<li data-md="">
23242324
<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>
23252325
<li data-md="">
2326-
<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>
2326+
<p>Resolve <var>promise</var> with undefined.</p>
23272327
</ol>
23282328
</section>
23292329
<section class="algorithm" data-algorithm="navigation-preload-manager-disable">
@@ -2337,7 +2337,7 @@ <h4 class="heading settled" data-level="3.6.2" id="navigation-preload-manager-di
23372337
<li data-md="">
23382338
<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>
23392339
<li data-md="">
2340-
<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>
2340+
<p>Resolve <var>promise</var> with undefined.</p>
23412341
</ol>
23422342
</section>
23432343
<section class="algorithm" data-algorithm="navigation-preload-manager-setheadervalue">
@@ -2351,7 +2351,7 @@ <h4 class="heading settled" data-level="3.6.3" id="navigation-preload-manager-se
23512351
<li data-md="">
23522352
<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>
23532353
<li data-md="">
2354-
<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>
2354+
<p>Resolve <var>promise</var> with undefined.</p>
23552355
</ol>
23562356
</section>
23572357
<section class="algorithm" data-algorithm="navigation-preload-manager-getstate">
@@ -2367,7 +2367,7 @@ <h4 class="heading settled" data-level="3.6.4" id="navigation-preload-manager-ge
23672367
<li data-md="">
23682368
<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>
23692369
<li data-md="">
2370-
<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>
2370+
<p>Resolve <var>promise</var> with <var>state</var>.</p>
23712371
</ol>
23722372
</section>
23732373
</section>
@@ -2908,7 +2908,7 @@ <h4 class="heading settled" data-level="4.3.2" id="clients-matchall"><span class
29082908
</ul>
29092909
<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>
29102910
<li data-md="">
2911-
<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>
2911+
<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>
29122912
</ol>
29132913
</ol>
29142914
<li data-md="">
@@ -6059,7 +6059,7 @@ <h3 class="heading settled" id="syntax"><span class="content">Syntax</span><a cl
60596059
<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>
60606060
<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>
60616061
<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>
6062-
<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>
6062+
<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>
60636063
<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>
60646064
<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>
60656065
<p>Thanks also to Vivian Cromwell, Greg Simon, Alex Komoroske, Wonsuk Lee, and Seojin Kim for their considerable professional support.</p>
@@ -6640,11 +6640,6 @@ <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span cla
66406640
<li><a href="https://fetch.spec.whatwg.org/#concept-request-url">url</a>
66416641
<li><a href="https://fetch.spec.whatwg.org/#concept-header-value">value</a>
66426642
</ul>
6643-
<li>
6644-
<a data-link-type="biblio">[FileAPI]</a> defines the following terms:
6645-
<ul>
6646-
<li><a href="https://w3c.github.io/FileAPI/#blob-url-resolve">resolve</a>
6647-
</ul>
66486643
<li>
66496644
<a data-link-type="biblio">[HTML]</a> defines the following terms:
66506645
<ul>
@@ -6887,8 +6882,6 @@ <h3 class="no-num no-ref heading settled" id="normative"><span class="content">N
68876882
<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>
68886883
<dt id="biblio-fetch">[FETCH]
68896884
<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>
6890-
<dt id="biblio-fileapi">[FileAPI]
6891-
<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>
68926885
<dt id="biblio-html">[HTML]
68936886
<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>
68946887
<dt id="biblio-infra">[INFRA]

docs/v1/index.bs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
667667
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:
668668
1. Let |registrationObjects| be a new [=list=].
669669
1. [=list/For each=] |registration| of |registrations|, [=append=] the {{ServiceWorkerRegistration}} object associated with |registration| to |registrationObjects|.
670-
1. [=Resolve=] |promise| with [=create a frozen array|a new frozen array of=] |registrationObjects| in |promise|'s [=relevant Realm=].
670+
1. Resolve |promise| with [=create a frozen array|a new frozen array of=] |registrationObjects| in |promise|'s [=relevant Realm=].
671671
1. Return |promise|.
672672
</section>
673673

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

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

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

0 commit comments

Comments
 (0)