|
1424 | 1424 | <div class="head">
|
1425 | 1425 | <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>
|
1426 | 1426 | <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> |
1428 | 1428 | <div data-fill-with="spec-metadata">
|
1429 | 1429 | <dl>
|
1430 | 1430 | <dt>This version:
|
@@ -3633,8 +3633,8 @@ <h3 class="heading settled" data-level="8.3" id="extension-to-service-worker-glo
|
3633 | 3633 | </section>
|
3634 | 3634 | <section>
|
3635 | 3635 | <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> |
3638 | 3638 | <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>
|
3639 | 3639 | </section>
|
3640 | 3640 | </section>
|
@@ -3856,7 +3856,7 @@ <h3 class="heading settled" id="update-algorithm"><span class="content">Update</
|
3856 | 3856 | <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>
|
3857 | 3857 | <dt><em>"<code>module</code>"</em>
|
3858 | 3858 | <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> |
3860 | 3860 | </dl>
|
3861 | 3861 | <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>
|
3862 | 3862 | <ol>
|
@@ -4279,7 +4279,7 @@ <h3 class="heading settled dfn-paneled" data-dfn-type="dfn" data-export="" id="o
|
4279 | 4279 | </ol>
|
4280 | 4280 | </section>
|
4281 | 4281 | <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> |
4283 | 4283 | <dl>
|
4284 | 4284 | <dt>Input
|
4285 | 4285 | <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
|
4988 | 4988 | <li><a href="#cachestorage-global-object">global object</a><span>, in §5.5</span>
|
4989 | 4989 | <li><a href="#on-fetch-request-algorithm">Handle Fetch</a><span>, in §Unnumbered section</span>
|
4990 | 4990 | <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> |
4991 | 4992 | <li><a href="#dfn-handle-functional-event-task-source">handle functional event task source</a><span>, in §2.5</span>
|
4992 | 4993 | <li><a href="#dom-cachestorage-has">has(cacheName)</a><span>, in §5.5.2</span>
|
4993 | 4994 | <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
|
5389 | 5390 | <li><a href="https://html.spec.whatwg.org/multipage/browsers.html#exceptions-enabled">exceptions enabled flag</a>
|
5390 | 5391 | <li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-execution-ready-flag">execution ready flag</a>
|
5391 | 5392 | <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> |
5393 | 5394 | <li><a href="https://html.spec.whatwg.org/multipage/interaction.html#focusing-steps">focusing steps</a>
|
5394 | 5395 | <li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-global">global object</a>
|
5395 | 5396 | <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
|
5526 | 5527 | <dt id="biblio-fetch">[FETCH]
|
5527 | 5528 | <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>
|
5528 | 5529 | <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> |
5530 | 5531 | <dt id="biblio-page-visibility">[PAGE-VISIBILITY]
|
5531 | 5532 | <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>
|
5532 | 5533 | <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
|
7348 | 7349 | <li><a href="#ref-for-on-fetch-request-algorithm-8">Handle Fetch</a>
|
7349 | 7350 | </ul>
|
7350 | 7351 | </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> |
7351 | 7358 | <aside class="dfn-panel" data-for="scope-match-algorithm">
|
7352 | 7359 | <b><a href="#scope-match-algorithm">#scope-match-algorithm</a></b><b>Referenced in:</b>
|
7353 | 7360 | <ul>
|
|
0 commit comments