|
7 | 7 | <link href="https://www.w3.org/StyleSheets/TR/2021/W3C-ED" rel="stylesheet">
|
8 | 8 | <meta content="Bikeshed version 82ce88815, updated Thu Sep 7 16:33:55 2023 -0700" name="generator">
|
9 | 9 | <link href="https://www.w3.org/TR/service-workers/" rel="canonical">
|
10 |
| - <meta content="8d4b9dfbeea511955a259949f2bc01227f995fe2" name="document-revision"> |
| 10 | + <meta content="613f5a2fbab5aa8c5b80d95eac49cbfe16df4ef3" name="document-revision"> |
11 | 11 | <style>/* Boilerplate: style-autolinks */
|
12 | 12 | .css.css, .property.property, .descriptor.descriptor {
|
13 | 13 | color: var(--a-normal-text);
|
@@ -3027,12 +3027,12 @@ <h3 class="heading settled" data-level="4.8" id="execution-context-events"><span
|
3027 | 3027 | <tbody>
|
3028 | 3028 | <tr>
|
3029 | 3029 | <td><dfn class="dfn-paneled idl-code" data-dfn-for="ServiceWorkerGlobalScope" data-dfn-type="event" data-export id="service-worker-global-scope-install-event"><code>install</code></dfn>
|
3030 |
| - <td><code class="idl"><a data-link-type="idl" href="#extendableevent" id="ref-for-extendableevent①④">ExtendableEvent</a></code> |
| 3030 | + <td><code class="idl"><a data-link-type="idl" href="#installevent" id="ref-for-installevent①">InstallEvent</a></code> |
3031 | 3031 | <td><a data-link-type="dfn" href="#dfn-lifecycle-events" id="ref-for-dfn-lifecycle-events①">Lifecycle</a>
|
3032 | 3032 | <td>The <a data-link-type="dfn" href="#serviceworkerglobalscope-service-worker" id="ref-for-serviceworkerglobalscope-service-worker②①">service worker</a>'s <a data-link-type="dfn" href="#dfn-containing-service-worker-registration" id="ref-for-dfn-containing-service-worker-registration①③">containing service worker registration</a>’s <a data-link-type="dfn" href="#dfn-installing-worker" id="ref-for-dfn-installing-worker⑦">installing worker</a> changes. (See step 11.2 of the <a data-link-type="dfn" href="#install" id="ref-for-install①">Install</a> algorithm.)
|
3033 | 3033 | <tr>
|
3034 | 3034 | <td><dfn class="dfn-paneled idl-code" data-dfn-for="ServiceWorkerGlobalScope" data-dfn-type="event" data-export id="service-worker-global-scope-activate-event"><code>activate</code></dfn>
|
3035 |
| - <td><code class="idl"><a data-link-type="idl" href="#extendableevent" id="ref-for-extendableevent①⑤">ExtendableEvent</a></code> |
| 3035 | + <td><code class="idl"><a data-link-type="idl" href="#extendableevent" id="ref-for-extendableevent①④">ExtendableEvent</a></code> |
3036 | 3036 | <td><a data-link-type="dfn" href="#dfn-lifecycle-events" id="ref-for-dfn-lifecycle-events②">Lifecycle</a>
|
3037 | 3037 | <td>The <a data-link-type="dfn" href="#serviceworkerglobalscope-service-worker" id="ref-for-serviceworkerglobalscope-service-worker②②">service worker</a>'s <a data-link-type="dfn" href="#dfn-containing-service-worker-registration" id="ref-for-dfn-containing-service-worker-registration①④">containing service worker registration</a>’s <a data-link-type="dfn" href="#dfn-active-worker" id="ref-for-dfn-active-worker①⑧">active worker</a> changes. (See step 12.2 of the <a data-link-type="dfn" href="#activate" id="ref-for-activate②">Activate</a> algorithm.)
|
3038 | 3038 | <tr>
|
@@ -3937,7 +3937,7 @@ <h3 class="heading settled" data-level="7.1" id="extension-to-service-worker-reg
|
3937 | 3937 | </section>
|
3938 | 3938 | <section>
|
3939 | 3939 | <h3 class="heading settled" data-level="7.2" id="extension-to-extendable-event"><span class="secno">7.2. </span><span class="content">Define Functional Event</span><a class="self-link" href="#extension-to-extendable-event"></a></h3>
|
3940 |
| - <p>Specifications <em>may</em> define a <a data-link-type="dfn" href="#dfn-functional-events" id="ref-for-dfn-functional-events①⓪">functional event</a> by extending <code class="idl"><a data-link-type="idl" href="#extendableevent" id="ref-for-extendableevent①⑥">ExtendableEvent</a></code> interface:</p> |
| 3940 | + <p>Specifications <em>may</em> define a <a data-link-type="dfn" href="#dfn-functional-events" id="ref-for-dfn-functional-events①⓪">functional event</a> by extending <code class="idl"><a data-link-type="idl" href="#extendableevent" id="ref-for-extendableevent①⑤">ExtendableEvent</a></code> interface:</p> |
3941 | 3941 | <pre class="example idl highlight def" data-no-idl id="example-85e5c3c4"><a class="self-link" href="#example-85e5c3c4"></a>// e.g. define FunctionalEvent interface
|
3942 | 3942 | <c- b>interface</c-> <c- g>FunctionalEvent</c-> : <c- n>ExtendableEvent</c-> {
|
3943 | 3943 | // add a functional event’s own attributes and methods
|
@@ -4630,7 +4630,7 @@ <h3 class="heading settled" id="installation-algorithm"><span class="content"><d
|
4630 | 4630 | <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task②⑦">Queue a task</a> <var>task</var> on <var>installingWorker</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-loop" id="ref-for-event-loop⑨">event loop</a> using the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#dom-manipulation-task-source" id="ref-for-dom-manipulation-task-source②⓪">DOM manipulation task source</a> to run the following steps:</p>
|
4631 | 4631 | <ol>
|
4632 | 4632 | <li data-md>
|
4633 |
| - <p>Let <var>e</var> be the result of <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-create" id="ref-for-concept-event-create②">creating an event</a> with <code class="idl"><a data-link-type="idl" href="#installevent" id="ref-for-installevent①">InstallEvent</a></code>.</p> |
| 4633 | + <p>Let <var>e</var> be the result of <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-create" id="ref-for-concept-event-create②">creating an event</a> with <code class="idl"><a data-link-type="idl" href="#installevent" id="ref-for-installevent②">InstallEvent</a></code>.</p> |
4634 | 4634 | <li data-md>
|
4635 | 4635 | <p>Initialize <var>e</var>’s <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-type" id="ref-for-dom-event-type">type</a></code> attribute to <code class="idl"><a class="idl-code" data-link-type="event" href="#service-worker-global-scope-install-event" id="ref-for-service-worker-global-scope-install-event⑤">install</a></code>.</p>
|
4636 | 4636 | <li data-md>
|
@@ -4761,7 +4761,7 @@ <h3 class="heading settled" id="activation-algorithm"><span class="content"><dfn
|
4761 | 4761 | <p><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task" id="ref-for-queue-a-task③⓪">Queue a task</a> <var>task</var> on <var>activeWorker</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#event-loop" id="ref-for-event-loop①⓪">event loop</a> using the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#dom-manipulation-task-source" id="ref-for-dom-manipulation-task-source②②">DOM manipulation task source</a> to run the following steps:</p>
|
4762 | 4762 | <ol>
|
4763 | 4763 | <li data-md>
|
4764 |
| - <p>Let <var>e</var> be the result of <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-create" id="ref-for-concept-event-create③">creating an event</a> with <code class="idl"><a data-link-type="idl" href="#extendableevent" id="ref-for-extendableevent①⑦">ExtendableEvent</a></code>.</p> |
| 4764 | + <p>Let <var>e</var> be the result of <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-create" id="ref-for-concept-event-create③">creating an event</a> with <code class="idl"><a data-link-type="idl" href="#extendableevent" id="ref-for-extendableevent①⑥">ExtendableEvent</a></code>.</p> |
4765 | 4765 | <li data-md>
|
4766 | 4766 | <p>Initialize <var>e</var>’s <code class="idl"><a data-link-type="idl" href="https://dom.spec.whatwg.org/#dom-event-type" id="ref-for-dom-event-type①">type</a></code> attribute to <code class="idl"><a class="idl-code" data-link-type="event" href="#service-worker-global-scope-activate-event" id="ref-for-service-worker-global-scope-activate-event⑤">activate</a></code>.</p>
|
4767 | 4767 | <li data-md>
|
@@ -5719,7 +5719,7 @@ <h3 class="heading settled" id="fire-functional-event-algorithm"><span class="co
|
5719 | 5719 | <dd data-md>
|
5720 | 5720 | <p><var>eventName</var>, a string</p>
|
5721 | 5721 | <dd data-md>
|
5722 |
| - <p><var>eventConstructor</var>, an event constructor that extends <code class="idl"><a data-link-type="idl" href="#extendableevent" id="ref-for-extendableevent①⑧">ExtendableEvent</a></code></p> |
| 5722 | + <p><var>eventConstructor</var>, an event constructor that extends <code class="idl"><a data-link-type="idl" href="#extendableevent" id="ref-for-extendableevent①⑦">ExtendableEvent</a></code></p> |
5723 | 5723 | <dd data-md>
|
5724 | 5724 | <p><var>registration</var>, a <a data-link-type="dfn" href="#dfn-service-worker-registration" id="ref-for-dfn-service-worker-registration⑤⑧">service worker registration</a></p>
|
5725 | 5725 | <dd data-md>
|
@@ -5795,7 +5795,7 @@ <h3 class="heading settled" id="fire-functional-event-algorithm"><span class="co
|
5795 | 5795 | <p>Note that the initialization steps and post-dispatch steps are optional. If they aren’t needed, the prose would be:</p>
|
5796 | 5796 | <ol>
|
5797 | 5797 | <li data-md>
|
5798 |
| - <p><a data-link-type="dfn" href="#fire-functional-event" id="ref-for-fire-functional-event②">Fire Functional Event</a> "<code>whatever</code>" using <code class="idl"><a data-link-type="idl" href="#extendableevent" id="ref-for-extendableevent①⑨">ExtendableEvent</a></code> on <var>serviceWorkerRegistration</var>.</p> |
| 5798 | + <p><a data-link-type="dfn" href="#fire-functional-event" id="ref-for-fire-functional-event②">Fire Functional Event</a> "<code>whatever</code>" using <code class="idl"><a data-link-type="idl" href="#extendableevent" id="ref-for-extendableevent①⑧">ExtendableEvent</a></code> on <var>serviceWorkerRegistration</var>.</p> |
5799 | 5799 | </ol>
|
5800 | 5800 | </div>
|
5801 | 5801 | </section>
|
@@ -10450,15 +10450,15 @@ <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content
|
10450 | 10450 | window.dfnpanelData['dom-clients-matchall'] = {"dfnID": "dom-clients-matchall", "url": "#dom-clients-matchall", "dfnText": "matchAll(options)", "refSections": [{"refs": [{"id": "ref-for-dom-clients-matchall"}], "title": "4.3. Clients"}, {"refs": [{"id": "ref-for-dom-clients-matchall\u2460"}], "title": "4.3.2. matchAll(options)"}], "external": false};
|
10451 | 10451 | window.dfnpanelData['dom-clients-openwindow'] = {"dfnID": "dom-clients-openwindow", "url": "#dom-clients-openwindow", "dfnText": "openWindow(url)", "refSections": [{"refs": [{"id": "ref-for-dom-clients-openwindow"}], "title": "4.3. Clients"}, {"refs": [{"id": "ref-for-dom-clients-openwindow\u2460"}], "title": "4.3.3. openWindow(url)"}], "external": false};
|
10452 | 10452 | window.dfnpanelData['dom-clients-claim'] = {"dfnID": "dom-clients-claim", "url": "#dom-clients-claim", "dfnText": "claim()", "refSections": [{"refs": [{"id": "ref-for-dom-clients-claim"}], "title": "4.3. Clients"}, {"refs": [{"id": "ref-for-dom-clients-claim\u2460"}], "title": "4.3.4. claim()"}], "external": false};
|
10453 |
| -window.dfnpanelData['extendableevent'] = {"dfnID": "extendableevent", "url": "#extendableevent", "dfnText": "ExtendableEvent", "refSections": [{"refs": [{"id": "ref-for-extendableevent"}], "title": "2.1. Service Worker"}, {"refs": [{"id": "ref-for-extendableevent\u2460"}, {"id": "ref-for-extendableevent\u2461"}, {"id": "ref-for-extendableevent\u2462"}, {"id": "ref-for-extendableevent\u2463"}, {"id": "ref-for-extendableevent\u2464"}, {"id": "ref-for-extendableevent\u2465"}, {"id": "ref-for-extendableevent\u2466"}, {"id": "ref-for-extendableevent\u2467"}], "title": "4.4. ExtendableEvent"}, {"refs": [{"id": "ref-for-extendableevent\u2468"}], "title": "4.5. InstallEvent"}, {"refs": [{"id": "ref-for-extendableevent\u2460\u24ea"}, {"id": "ref-for-extendableevent\u2460\u2460"}], "title": "4.6. FetchEvent"}, {"refs": [{"id": "ref-for-extendableevent\u2460\u2461"}, {"id": "ref-for-extendableevent\u2460\u2462"}], "title": "4.7. ExtendableMessageEvent"}, {"refs": [{"id": "ref-for-extendableevent\u2460\u2463"}, {"id": "ref-for-extendableevent\u2460\u2464"}], "title": "4.8. Events"}, {"refs": [{"id": "ref-for-extendableevent\u2460\u2465"}], "title": "7.2. Define Functional Event"}, {"refs": [{"id": "ref-for-extendableevent\u2460\u2466"}], "title": "Activate"}, {"refs": [{"id": "ref-for-extendableevent\u2460\u2467"}, {"id": "ref-for-extendableevent\u2460\u2468"}], "title": "Fire Functional Event"}], "external": false}; |
| 10453 | +window.dfnpanelData['extendableevent'] = {"dfnID": "extendableevent", "url": "#extendableevent", "dfnText": "ExtendableEvent", "refSections": [{"refs": [{"id": "ref-for-extendableevent"}], "title": "2.1. Service Worker"}, {"refs": [{"id": "ref-for-extendableevent\u2460"}, {"id": "ref-for-extendableevent\u2461"}, {"id": "ref-for-extendableevent\u2462"}, {"id": "ref-for-extendableevent\u2463"}, {"id": "ref-for-extendableevent\u2464"}, {"id": "ref-for-extendableevent\u2465"}, {"id": "ref-for-extendableevent\u2466"}, {"id": "ref-for-extendableevent\u2467"}], "title": "4.4. ExtendableEvent"}, {"refs": [{"id": "ref-for-extendableevent\u2468"}], "title": "4.5. InstallEvent"}, {"refs": [{"id": "ref-for-extendableevent\u2460\u24ea"}, {"id": "ref-for-extendableevent\u2460\u2460"}], "title": "4.6. FetchEvent"}, {"refs": [{"id": "ref-for-extendableevent\u2460\u2461"}, {"id": "ref-for-extendableevent\u2460\u2462"}], "title": "4.7. ExtendableMessageEvent"}, {"refs": [{"id": "ref-for-extendableevent\u2460\u2463"}], "title": "4.8. Events"}, {"refs": [{"id": "ref-for-extendableevent\u2460\u2464"}], "title": "7.2. Define Functional Event"}, {"refs": [{"id": "ref-for-extendableevent\u2460\u2465"}], "title": "Activate"}, {"refs": [{"id": "ref-for-extendableevent\u2460\u2466"}, {"id": "ref-for-extendableevent\u2460\u2467"}], "title": "Fire Functional Event"}], "external": false}; |
10454 | 10454 | window.dfnpanelData['dictdef-extendableeventinit'] = {"dfnID": "dictdef-extendableeventinit", "url": "#dictdef-extendableeventinit", "dfnText": "ExtendableEventInit", "refSections": [{"refs": [{"id": "ref-for-dictdef-extendableeventinit"}], "title": "4.4. ExtendableEvent"}, {"refs": [{"id": "ref-for-dictdef-extendableeventinit\u2460"}], "title": "4.6. FetchEvent"}, {"refs": [{"id": "ref-for-dictdef-extendableeventinit\u2461"}], "title": "4.7. ExtendableMessageEvent"}], "external": false};
|
10455 | 10455 | window.dfnpanelData['extendableevent-extend-lifetime-promises'] = {"dfnID": "extendableevent-extend-lifetime-promises", "url": "#extendableevent-extend-lifetime-promises", "dfnText": "extend lifetime promises", "refSections": [{"refs": [{"id": "ref-for-extendableevent-extend-lifetime-promises"}, {"id": "ref-for-extendableevent-extend-lifetime-promises\u2460"}, {"id": "ref-for-extendableevent-extend-lifetime-promises\u2461"}, {"id": "ref-for-extendableevent-extend-lifetime-promises\u2462"}, {"id": "ref-for-extendableevent-extend-lifetime-promises\u2463"}, {"id": "ref-for-extendableevent-extend-lifetime-promises\u2464"}], "title": "4.4. ExtendableEvent"}, {"refs": [{"id": "ref-for-extendableevent-extend-lifetime-promises\u2465"}, {"id": "ref-for-extendableevent-extend-lifetime-promises\u2466"}], "title": "Install"}, {"refs": [{"id": "ref-for-extendableevent-extend-lifetime-promises\u2467"}], "title": "Unregister"}], "external": false};
|
10456 | 10456 | window.dfnpanelData['extendableevent-pending-promises-count'] = {"dfnID": "extendableevent-pending-promises-count", "url": "#extendableevent-pending-promises-count", "dfnText": "pending promises count", "refSections": [{"refs": [{"id": "ref-for-extendableevent-pending-promises-count"}, {"id": "ref-for-extendableevent-pending-promises-count\u2460"}, {"id": "ref-for-extendableevent-pending-promises-count\u2461"}, {"id": "ref-for-extendableevent-pending-promises-count\u2462"}, {"id": "ref-for-extendableevent-pending-promises-count\u2463"}, {"id": "ref-for-extendableevent-pending-promises-count\u2464"}], "title": "4.4. ExtendableEvent"}], "external": false};
|
10457 | 10457 | window.dfnpanelData['extendableevent-timed-out-flag'] = {"dfnID": "extendableevent-timed-out-flag", "url": "#extendableevent-timed-out-flag", "dfnText": "timed out flag", "refSections": [{"refs": [{"id": "ref-for-extendableevent-timed-out-flag"}], "title": "4.4. ExtendableEvent"}, {"refs": [{"id": "ref-for-extendableevent-timed-out-flag\u2460"}], "title": "Install"}], "external": false};
|
10458 | 10458 | window.dfnpanelData['extendableevent-active'] = {"dfnID": "extendableevent-active", "url": "#extendableevent-active", "dfnText": "active", "refSections": [{"refs": [{"id": "ref-for-extendableevent-active"}], "title": "4.4. ExtendableEvent"}, {"refs": [{"id": "ref-for-extendableevent-active\u2460"}], "title": "Install"}, {"refs": [{"id": "ref-for-extendableevent-active\u2461"}], "title": "Activate"}, {"refs": [{"id": "ref-for-extendableevent-active\u2462"}, {"id": "ref-for-extendableevent-active\u2463"}], "title": "Update Service Worker Extended Events Set"}, {"refs": [{"id": "ref-for-extendableevent-active\u2464"}], "title": "Service Worker Has No Pending Events"}], "external": false};
|
10459 | 10459 | window.dfnpanelData['dom-extendableevent-waituntil'] = {"dfnID": "dom-extendableevent-waituntil", "url": "#dom-extendableevent-waituntil", "dfnText": "waitUntil(f)", "refSections": [{"refs": [{"id": "ref-for-dom-extendableevent-waituntil"}, {"id": "ref-for-dom-extendableevent-waituntil\u2462"}], "title": "4.4. ExtendableEvent"}, {"refs": [{"id": "ref-for-dom-extendableevent-waituntil\u2460"}, {"id": "ref-for-dom-extendableevent-waituntil\u2461"}], "title": "4.4.1. event.waitUntil(f)"}, {"refs": [{"id": "ref-for-dom-extendableevent-waituntil\u2463"}], "title": "4.6.7. event.respondWith(r)"}, {"refs": [{"id": "ref-for-dom-extendableevent-waituntil\u2464"}], "title": "4.7. ExtendableMessageEvent"}], "external": false};
|
10460 | 10460 | window.dfnpanelData['extendableevent-add-lifetime-promise'] = {"dfnID": "extendableevent-add-lifetime-promise", "url": "#extendableevent-add-lifetime-promise", "dfnText": "add lifetime promise", "refSections": [{"refs": [{"id": "ref-for-extendableevent-add-lifetime-promise"}], "title": "4.4.1. event.waitUntil(f)"}, {"refs": [{"id": "ref-for-extendableevent-add-lifetime-promise\u2460"}], "title": "4.6.7. event.respondWith(r)"}], "external": false};
|
10461 |
| -window.dfnpanelData['installevent'] = {"dfnID": "installevent", "url": "#installevent", "dfnText": "InstallEvent", "refSections": [{"refs": [{"id": "ref-for-installevent"}], "title": "4.5. InstallEvent"}, {"refs": [{"id": "ref-for-installevent\u2460"}], "title": "Install"}], "external": false}; |
| 10461 | +window.dfnpanelData['installevent'] = {"dfnID": "installevent", "url": "#installevent", "dfnText": "InstallEvent", "refSections": [{"refs": [{"id": "ref-for-installevent"}], "title": "4.5. InstallEvent"}, {"refs": [{"id": "ref-for-installevent\u2460"}], "title": "4.8. Events"}, {"refs": [{"id": "ref-for-installevent\u2461"}], "title": "Install"}], "external": false}; |
10462 | 10462 | window.dfnpanelData['dictdef-routerrule'] = {"dfnID": "dictdef-routerrule", "url": "#dictdef-routerrule", "dfnText": "RouterRule", "refSections": [{"refs": [{"id": "ref-for-dictdef-routerrule"}], "title": "2.1. Service Worker"}, {"refs": [{"id": "ref-for-dictdef-routerrule\u2460"}, {"id": "ref-for-dictdef-routerrule\u2461"}], "title": "4.5. InstallEvent"}, {"refs": [{"id": "ref-for-dictdef-routerrule\u2462"}, {"id": "ref-for-dictdef-routerrule\u2463"}], "title": "4.5.1. event.addRoutes(rules)"}], "external": false};
|
10463 | 10463 | window.dfnpanelData['dom-routerrule-condition'] = {"dfnID": "dom-routerrule-condition", "url": "#dom-routerrule-condition", "dfnText": "condition", "refSections": [{"refs": [{"id": "ref-for-dom-routerrule-condition"}], "title": "4.5.1. event.addRoutes(rules)"}, {"refs": [{"id": "ref-for-dom-routerrule-condition\u2460"}], "title": "Get Router Source"}], "external": false};
|
10464 | 10464 | window.dfnpanelData['dom-routerrule-source'] = {"dfnID": "dom-routerrule-source", "url": "#dom-routerrule-source", "dfnText": "source", "refSections": [{"refs": [{"id": "ref-for-dom-routerrule-source"}], "title": "4.5.1. event.addRoutes(rules)"}, {"refs": [{"id": "ref-for-dom-routerrule-source\u2460"}], "title": "Get Router Source"}], "external": false};
|
|
0 commit comments