Skip to content

Commit 0dcd798

Browse files
committed
Backport a871d5e to V1
1 parent b999119 commit 0dcd798

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

docs/v1/index.bs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2450,9 +2450,9 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
24502450
<section>
24512451
<h3 id="request-functional-event-dispatch">Request Functional Event Dispatch</h3>
24522452

2453-
<p>To request a <a href="#dfn-functional-events">functional event</a> dispatch to a <a href="#dfn-service-worker">service worker</a>, specifications <em class="rfc2119" title="MAY">may</em> invoke <a href="#handle-functional-event-algorithm">Handle Functional Event</a> algorithm with its <a href="#dfn-service-worker-registration">service worker registration</a> <var>registration</var> and the algorithm <var>callbackSteps</var> as the arguments.</p>
2453+
<p>To request a <a href="#dfn-functional-events">functional event</a> dispatch to a <a href="#dfn-service-worker">service worker</a>, specifications <em class="rfc2119" title="MAY">may</em> invoke <a>Handle Functional Event</a> algorithm with its <a href="#dfn-service-worker-registration">service worker registration</a> <var>registration</var> and the algorithm <var>callbackSteps</var> as the arguments.</p>
24542454

2455-
<p>Specifications <em class="rfc2119" title="MAY">may</em> define an algorithm <var>callbackSteps</var> where the corresponding <a href="#dfn-functional-events">functional event</a> can be created and fired with specification specific objects. The algorithm is passed <var>globalObject</var> (a {{ServiceWorkerGlobalScope}} object) at which it <em class="rfc2119" title="MAY">may</em> fire its <a href="#dfn-functional-events">functional events</a>. This algorithm is called on a <a>task</a> <a lt="queue a task">queued</a> by <a href="#handle-functional-event-algorithm">Handle Functional Event</a> algorithm.</p>
2455+
<p>Specifications <em class="rfc2119" title="MAY">may</em> define an algorithm <var>callbackSteps</var> where the corresponding <a href="#dfn-functional-events">functional event</a> can be created and fired with specification specific objects. The algorithm is passed <var>globalObject</var> (a {{ServiceWorkerGlobalScope}} object) at which it <em class="rfc2119" title="MAY">may</em> fire its <a href="#dfn-functional-events">functional events</a>. This algorithm is called on a <a>task</a> <a lt="queue a task">queued</a> by <a>Handle Functional Event</a> algorithm.</p>
24562456

24572457
<p class="note">See an <a href="https://notifications.spec.whatwg.org/#activating-a-notification">example</a> hook defined in <a biblio data-biblio-type="informative" lt="notifications">Notifications API</a>.</p>
24582458
</section>
@@ -2702,7 +2702,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
27022702
<dt><em>"<code>classic</code>"</em></dt>
27032703
<dd><p><a>Fetch a classic worker script</a> given <var>job</var>’s <a lt="URL serializer">serialized</a> <a href="#dfn-job-script-url">script url</a>, <var>job</var>’s <a href="#dfn-job-client">client</a>, and "<code>serviceworker</code>".</p></dd>
27042704
<dt><em>"<code>module</code>"</em></dt>
2705-
<dd><p><a>Fetch a module worker script tree</a> given <var>job</var>’s <a lt="URL serializer">serialized</a> <a href="#dfn-job-script-url">script url</a>, <var>job</var>’s <a href="#dfn-job-client">client</a>, "<code>serviceworker</code>", "<code>omit</code>", and the to-be-created <a>environment settings object</a> for this service worker.</p></dd> <!-- TODO: reorganize algorithm so that the worker environment is created before fetching happens -->
2705+
<dd><p><a>Fetch a module worker script graph</a> given <var>job</var>’s <a lt="URL serializer">serialized</a> <a href="#dfn-job-script-url">script url</a>, <var>job</var>’s <a href="#dfn-job-client">client</a>, "<code>serviceworker</code>", "<code>omit</code>", and the to-be-created <a>environment settings object</a> for this service worker.</p></dd> <!-- TODO: reorganize algorithm so that the worker environment is created before fetching happens -->
27062706
</dl>
27072707
<p>To <a for="fetching scripts">perform the fetch</a> given <var>request</var>, run the following steps if the <a for="fetching scripts">is top-level</a> flag is set:</p>
27082708
<ol>
@@ -3144,7 +3144,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
31443144
</section>
31453145

31463146
<section algorithm="handle-functional-event-algorithm">
3147-
<h3 id="handle-functional-event-algorithm">Handle Functional Event</h3>
3147+
<h3 id="handle-functional-event-algorithm" dfn export>Handle Functional Event</h3>
31483148

31493149
<dl>
31503150
<dt>Input</dt>

docs/v1/index.html

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,7 +1424,7 @@
14241424
<div class="head">
14251425
<p data-fill-with="logo"><a class="logo" href="http://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72"> </a> </p>
14261426
<h1 class="p-name no-ref" id="title">Service Workers 1</h1>
1427-
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2016-11-17">17 November 2016</time></span></h2>
1427+
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2016-11-22">22 November 2016</time></span></h2>
14281428
<div data-fill-with="spec-metadata">
14291429
<dl>
14301430
<dt>This version:
@@ -3633,8 +3633,8 @@ <h3 class="heading settled" data-level="8.3" id="extension-to-service-worker-glo
36333633
</section>
36343634
<section>
36353635
<h3 class="heading settled" data-level="8.4" id="request-functional-event-dispatch"><span class="secno">8.4. </span><span class="content">Request Functional Event Dispatch</span><a class="self-link" href="#request-functional-event-dispatch"></a></h3>
3636-
<p>To request a <a href="#dfn-functional-events" id="ref-for-dfn-functional-events-7">functional event</a> dispatch to a <a href="#dfn-service-worker" id="ref-for-dfn-service-worker-89">service worker</a>, specifications <em class="rfc2119" title="MAY">may</em> invoke <a href="#handle-functional-event-algorithm">Handle Functional Event</a> algorithm with its <a href="#dfn-service-worker-registration" id="ref-for-dfn-service-worker-registration-47">service worker registration</a> <var>registration</var> and the algorithm <var>callbackSteps</var> as the arguments.</p>
3637-
<p>Specifications <em class="rfc2119" title="MAY">may</em> define an algorithm <var>callbackSteps</var> where the corresponding <a href="#dfn-functional-events" id="ref-for-dfn-functional-events-8">functional event</a> can be created and fired with specification specific objects. The algorithm is passed <var>globalObject</var> (a <code class="idl"><a data-link-type="idl" href="#serviceworkerglobalscope" id="ref-for-serviceworkerglobalscope-15">ServiceWorkerGlobalScope</a></code> object) at which it <em class="rfc2119" title="MAY">may</em> fire its <a href="#dfn-functional-events" id="ref-for-dfn-functional-events-9">functional events</a>. This algorithm is called on a <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-task">task</a> <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task">queued</a> by <a href="#handle-functional-event-algorithm">Handle Functional Event</a> algorithm.</p>
3636+
<p>To request a <a href="#dfn-functional-events" id="ref-for-dfn-functional-events-7">functional event</a> dispatch to a <a href="#dfn-service-worker" id="ref-for-dfn-service-worker-89">service worker</a>, specifications <em class="rfc2119" title="MAY">may</em> invoke <a data-link-type="dfn" href="#handle-functional-event-algorithm" id="ref-for-handle-functional-event-algorithm-1">Handle Functional Event</a> algorithm with its <a href="#dfn-service-worker-registration" id="ref-for-dfn-service-worker-registration-47">service worker registration</a> <var>registration</var> and the algorithm <var>callbackSteps</var> as the arguments.</p>
3637+
<p>Specifications <em class="rfc2119" title="MAY">may</em> define an algorithm <var>callbackSteps</var> where the corresponding <a href="#dfn-functional-events" id="ref-for-dfn-functional-events-8">functional event</a> can be created and fired with specification specific objects. The algorithm is passed <var>globalObject</var> (a <code class="idl"><a data-link-type="idl" href="#serviceworkerglobalscope" id="ref-for-serviceworkerglobalscope-15">ServiceWorkerGlobalScope</a></code> object) at which it <em class="rfc2119" title="MAY">may</em> fire its <a href="#dfn-functional-events" id="ref-for-dfn-functional-events-9">functional events</a>. This algorithm is called on a <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-task">task</a> <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task">queued</a> by <a data-link-type="dfn" href="#handle-functional-event-algorithm" id="ref-for-handle-functional-event-algorithm-2">Handle Functional Event</a> algorithm.</p>
36383638
<p class="note" role="note">See an <a href="https://notifications.spec.whatwg.org/#activating-a-notification">example</a> hook defined in <a data-link-type="biblio" href="#biblio-notifications">Notifications API</a>.</p>
36393639
</section>
36403640
</section>
@@ -3856,7 +3856,7 @@ <h3 class="heading settled" id="update-algorithm"><span class="content">Update</
38563856
<p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-classic-worker-script">Fetch a classic worker script</a> given <var>job</var>’s <a data-link-type="dfn" href="https://url.spec.whatwg.org/#concept-url-serializer">serialized</a> <a href="#dfn-job-script-url" id="ref-for-dfn-job-script-url-7">script url</a>, <var>job</var>’s <a href="#dfn-job-client" id="ref-for-dfn-job-client-12">client</a>, and "<code>serviceworker</code>".</p>
38573857
<dt><em>"<code>module</code>"</em>
38583858
<dd>
3859-
<p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-module-worker-script-tree">Fetch a module worker script tree</a> given <var>job</var>’s <a data-link-type="dfn" href="https://url.spec.whatwg.org/#concept-url-serializer">serialized</a> <a href="#dfn-job-script-url" id="ref-for-dfn-job-script-url-8">script url</a>, <var>job</var>’s <a href="#dfn-job-client" id="ref-for-dfn-job-client-13">client</a>, "<code>serviceworker</code>", "<code>omit</code>", and the to-be-created <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object">environment settings object</a> for this service worker.</p>
3859+
<p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-module-worker-script-tree">Fetch a module worker script graph</a> given <var>job</var>’s <a data-link-type="dfn" href="https://url.spec.whatwg.org/#concept-url-serializer">serialized</a> <a href="#dfn-job-script-url" id="ref-for-dfn-job-script-url-8">script url</a>, <var>job</var>’s <a href="#dfn-job-client" id="ref-for-dfn-job-client-13">client</a>, "<code>serviceworker</code>", "<code>omit</code>", and the to-be-created <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object">environment settings object</a> for this service worker.</p>
38603860
</dl>
38613861
<p>To <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#fetching-scripts-perform-fetch">perform the fetch</a> given <var>request</var>, run the following steps if the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#fetching-scripts-is-top-level">is top-level</a> flag is set:</p>
38623862
<ol>
@@ -4279,7 +4279,7 @@ <h3 class="heading settled dfn-paneled" data-dfn-type="dfn" data-export="" id="o
42794279
</ol>
42804280
</section>
42814281
<section class="algorithm" data-algorithm="handle-functional-event-algorithm">
4282-
<h3 class="heading settled" id="handle-functional-event-algorithm"><span class="content">Handle Functional Event</span><a class="self-link" href="#handle-functional-event-algorithm"></a></h3>
4282+
<h3 class="heading settled dfn-paneled" data-dfn-type="dfn" data-export="" id="handle-functional-event-algorithm"><span class="content">Handle Functional Event</span></h3>
42834283
<dl>
42844284
<dt>Input
42854285
<dd><var>registration</var>, a <a data-link-type="dfn" href="#dfn-service-worker-registration" id="ref-for-dfn-service-worker-registration-54">service worker registration</a>
@@ -4988,6 +4988,7 @@ <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="c
49884988
<li><a href="#cachestorage-global-object">global object</a><span>, in §5.5</span>
49894989
<li><a href="#on-fetch-request-algorithm">Handle Fetch</a><span>, in §Unnumbered section</span>
49904990
<li><a href="#dfn-handle-fetch-task-source">handle fetch task source</a><span>, in §2.5</span>
4991+
<li><a href="#handle-functional-event-algorithm">Handle Functional Event</a><span>, in §Unnumbered section</span>
49914992
<li><a href="#dfn-handle-functional-event-task-source">handle functional event task source</a><span>, in §2.5</span>
49924993
<li><a href="#dom-cachestorage-has">has(cacheName)</a><span>, in §5.5.2</span>
49934994
<li><a href="#dfn-has-ever-been-evaluated-flag">has ever been evaluated flag</a><span>, in §2.1</span>
@@ -5389,7 +5390,7 @@ <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span cla
53895390
<li><a href="https://html.spec.whatwg.org/multipage/browsers.html#exceptions-enabled">exceptions enabled flag</a>
53905391
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-execution-ready-flag">execution ready flag</a>
53915392
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-classic-worker-script">fetch a classic worker script</a>
5392-
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-module-worker-script-tree">fetch a module worker script tree</a>
5393+
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-module-worker-script-tree">fetch a module worker script graph</a>
53935394
<li><a href="https://html.spec.whatwg.org/multipage/interaction.html#focusing-steps">focusing steps</a>
53945395
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-global">global object</a>
53955396
<li><a href="https://html.spec.whatwg.org/multipage/interaction.html#has-focus-steps">has focus steps</a>
@@ -5526,7 +5527,7 @@ <h3 class="no-num no-ref heading settled" id="normative"><span class="content">N
55265527
<dt id="biblio-fetch">[FETCH]
55275528
<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>
55285529
<dt id="biblio-html">[HTML]
5529-
<dd>Ian Hickson. <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>
5530+
<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>
55305531
<dt id="biblio-page-visibility">[PAGE-VISIBILITY]
55315532
<dd>Jatinder Mann; Arvind Jain. <a href="https://www.w3.org/TR/page-visibility/">Page Visibility (Second Edition)</a>. 29 October 2013. REC. URL: <a href="https://www.w3.org/TR/page-visibility/">https://www.w3.org/TR/page-visibility/</a>
55325533
<dt id="biblio-promises-guide">[PROMISES-GUIDE]
@@ -7348,6 +7349,12 @@ <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content
73487349
<li><a href="#ref-for-on-fetch-request-algorithm-8">Handle Fetch</a>
73497350
</ul>
73507351
</aside>
7352+
<aside class="dfn-panel" data-for="handle-functional-event-algorithm">
7353+
<b><a href="#handle-functional-event-algorithm">#handle-functional-event-algorithm</a></b><b>Referenced in:</b>
7354+
<ul>
7355+
<li><a href="#ref-for-handle-functional-event-algorithm-1">8.4. Request Functional Event Dispatch</a> <a href="#ref-for-handle-functional-event-algorithm-2">(2)</a>
7356+
</ul>
7357+
</aside>
73517358
<aside class="dfn-panel" data-for="scope-match-algorithm">
73527359
<b><a href="#scope-match-algorithm">#scope-match-algorithm</a></b><b>Referenced in:</b>
73537360
<ul>

0 commit comments

Comments
 (0)