Skip to content

Commit b999119

Browse files
authored
Merge pull request #1008 from w3c/annevk/handle-functional-event
Editorial: export Handle Functional Event
2 parents 7c08c10 + a871d5e commit b999119

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

docs/index.bs

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

2746-
<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>
2746+
<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>
27472747

2748-
<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>
2748+
<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>
27492749

27502750
<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>
27512751
</section>
@@ -3029,7 +3029,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
30293029
<dt><em>"<code>classic</code>"</em></dt>
30303030
<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>
30313031
<dt><em>"<code>module</code>"</em></dt>
3032-
<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 -->
3032+
<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 -->
30333033
</dl>
30343034
<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>
30353035
<ol>
@@ -3570,7 +3570,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
35703570
</section>
35713571

35723572
<section algorithm="handle-functional-event-algorithm">
3573-
<h3 id="handle-functional-event-algorithm">Handle Functional Event</h3>
3573+
<h3 id="handle-functional-event-algorithm" dfn export>Handle Functional Event</h3>
35743574

35753575
<dl>
35763576
<dt>Input</dt>

docs/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 Nightly</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-21">21 November 2016</time></span></h2>
14281428
<div data-fill-with="spec-metadata">
14291429
<dl>
14301430
<dt>This version:
@@ -3903,8 +3903,8 @@ <h3 class="heading settled" data-level="9.3" id="extension-to-service-worker-glo
39033903
</section>
39043904
<section>
39053905
<h3 class="heading settled" data-level="9.4" id="request-functional-event-dispatch"><span class="secno">9.4. </span><span class="content">Request Functional Event Dispatch</span><a class="self-link" href="#request-functional-event-dispatch"></a></h3>
3906-
<p>To request a <a href="#dfn-functional-events" id="ref-for-dfn-functional-events-9">functional event</a> dispatch to a <a href="#dfn-service-worker" id="ref-for-dfn-service-worker-95">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-48">service worker registration</a> <var>registration</var> and the algorithm <var>callbackSteps</var> as the arguments.</p>
3907-
<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-10">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-11">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>
3906+
<p>To request a <a href="#dfn-functional-events" id="ref-for-dfn-functional-events-9">functional event</a> dispatch to a <a href="#dfn-service-worker" id="ref-for-dfn-service-worker-95">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-48">service worker registration</a> <var>registration</var> and the algorithm <var>callbackSteps</var> as the arguments.</p>
3907+
<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-10">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-11">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>
39083908
<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>
39093909
</section>
39103910
</section>
@@ -4157,7 +4157,7 @@ <h3 class="heading settled" id="update-algorithm"><span class="content">Update</
41574157
<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-10">client</a>, and "<code>serviceworker</code>".</p>
41584158
<dt><em>"<code>module</code>"</em>
41594159
<dd>
4160-
<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-11">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>
4160+
<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-11">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>
41614161
</dl>
41624162
<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>
41634163
<ol>
@@ -4676,7 +4676,7 @@ <h3 class="heading settled dfn-paneled" data-dfn-type="dfn" data-export="" id="o
46764676
</ol>
46774677
</section>
46784678
<section class="algorithm" data-algorithm="handle-functional-event-algorithm">
4679-
<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>
4679+
<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>
46804680
<dl>
46814681
<dt>Input
46824682
<dd><var>registration</var>, a <a data-link-type="dfn" href="#dfn-service-worker-registration" id="ref-for-dfn-service-worker-registration-55">service worker registration</a>
@@ -5416,6 +5416,7 @@ <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="c
54165416
<li><a href="#on-fetch-request-algorithm">Handle Fetch</a><span>, in §Unnumbered section</span>
54175417
<li><a href="#dfn-handle-fetch-task-source">handle fetch task source</a><span>, in §2.5</span>
54185418
<li><a href="#on-foreign-fetch-request-algorithm">Handle Foreign Fetch</a><span>, in §Unnumbered section</span>
5419+
<li><a href="#handle-functional-event-algorithm">Handle Functional Event</a><span>, in §Unnumbered section</span>
54195420
<li><a href="#dfn-handle-functional-event-task-source">handle functional event task source</a><span>, in §2.5</span>
54205421
<li><a href="#dom-cachestorage-has">has(cacheName)</a><span>, in §6.5.2</span>
54215422
<li><a href="#dfn-has-ever-been-evaluated-flag">has ever been evaluated flag</a><span>, in §2.1</span>
@@ -5883,7 +5884,7 @@ <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span cla
58835884
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-execution-ready-flag">execution ready flag</a>
58845885
<li><a href="https://html.spec.whatwg.org/multipage/semantics.html#external-resource-link">external resource link</a>
58855886
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-classic-worker-script">fetch a classic worker script</a>
5886-
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-module-worker-script-tree">fetch a module worker script tree</a>
5887+
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-module-worker-script-tree">fetch a module worker script graph</a>
58875888
<li><a href="https://html.spec.whatwg.org/multipage/interaction.html#focusing-steps">focusing steps</a>
58885889
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-global">global object</a>
58895890
<li><a href="https://html.spec.whatwg.org/multipage/interaction.html#has-focus-steps">has focus steps</a>
@@ -6028,7 +6029,7 @@ <h3 class="no-num no-ref heading settled" id="normative"><span class="content">N
60286029
<dt id="biblio-fetch">[FETCH]
60296030
<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>
60306031
<dt id="biblio-html">[HTML]
6031-
<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>
6032+
<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>
60326033
<dt id="biblio-page-visibility">[PAGE-VISIBILITY]
60336034
<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>
60346035
<dt id="biblio-promises-guide">[PROMISES-GUIDE]
@@ -8123,6 +8124,12 @@ <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content
81238124
<li><a href="#ref-for-on-foreign-fetch-request-algorithm-5">Handle Foreign Fetch</a>
81248125
</ul>
81258126
</aside>
8127+
<aside class="dfn-panel" data-for="handle-functional-event-algorithm">
8128+
<b><a href="#handle-functional-event-algorithm">#handle-functional-event-algorithm</a></b><b>Referenced in:</b>
8129+
<ul>
8130+
<li><a href="#ref-for-handle-functional-event-algorithm-1">9.4. Request Functional Event Dispatch</a> <a href="#ref-for-handle-functional-event-algorithm-2">(2)</a>
8131+
</ul>
8132+
</aside>
81268133
<aside class="dfn-panel" data-for="scope-match-algorithm">
81278134
<b><a href="#scope-match-algorithm">#scope-match-algorithm</a></b><b>Referenced in:</b>
81288135
<ul>

0 commit comments

Comments
 (0)