|
1178 | 1178 | </style>
|
1179 | 1179 | <meta content="Bikeshed version 459c2a65222f1973d4f1846a767ec88e8a5dae3e" name="generator">
|
1180 | 1180 | <link href="https://jakearchibald.github.io/background-fetch" rel="canonical">
|
1181 |
| - <meta content="a3bb2d0f0739c391f7fc951b36b1e58927a00634" name="document-revision"> |
| 1181 | + <meta content="fc6206509a5fa3c5e9071356bb0c42d3c2450b4d" name="document-revision"> |
1182 | 1182 | <style>/* style-md-lists */
|
1183 | 1183 |
|
1184 | 1184 | /* This is a weird hack for me not yet following the commonmark spec
|
|
1425 | 1425 | <div class="head">
|
1426 | 1426 | <p data-fill-with="logo"></p>
|
1427 | 1427 | <h1 class="p-name no-ref" id="title">Background Fetch</h1>
|
1428 |
| - <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2017-09-21">21 September 2017</time></span></h2> |
| 1428 | + <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2017-09-25">25 September 2017</time></span></h2> |
1429 | 1429 | <div data-fill-with="spec-metadata">
|
1430 | 1430 | <dl>
|
1431 | 1431 | <dt>This version:
|
@@ -1927,25 +1927,15 @@ <h4 class="heading settled" data-level="4.3.1" id="background-fetch-registration
|
1927 | 1927 | <li data-md="">
|
1928 | 1928 | <p><a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#resolve-promise" id="ref-for-resolve-promise⑥">Resolve</a> <var>promise</var> with true.</p>
|
1929 | 1929 | <li data-md="">
|
1930 |
| - <p>TODO: terminate the fetches</p> |
| 1930 | + <p>TODO: terminate the fetches.</p> |
1931 | 1931 | <li data-md="">
|
1932 |
| - <p>Let <var>eventType</var> be <code>"backgroundfetchabort"</code>.</p> |
1933 |
| - <li data-md=""> |
1934 |
| - <p><a data-link-type="dfn" href="https://w3c.github.io/ServiceWorker/#handle-functional-event" id="ref-for-handle-functional-event">Handle functional event</a> for <var>swRegistration</var> and <var>eventType</var> using the following steps:</p> |
1935 |
| - <p class="issue" id="issue-ea032efd"><a class="self-link" href="#issue-ea032efd"></a> This isn’t quite how <a data-link-type="dfn" href="https://w3c.github.io/ServiceWorker/#handle-functional-event" id="ref-for-handle-functional-event①">handle functional event</a> works, but its current definition doesn’t really make sense (<a href="https://github.com/w3c/ServiceWorker/issues/1196">issue</a>).</p> |
1936 |
| - <ol> |
1937 |
| - <li data-md=""> |
1938 |
| - <p>Let <var>event</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="#backgroundfetchsettledevent" id="ref-for-backgroundfetchsettledevent">BackgroundFetchSettledEvent</a></code>.</p> |
1939 |
| - <li data-md=""> |
1940 |
| - <p>Let <var>settledFetches</var> be a new <code class="idl"><a data-link-type="idl" href="#backgroundfetchsettledfetches" id="ref-for-backgroundfetchsettledfetches">BackgroundFetchSettledFetches</a></code>. TODO: associate this with <var>bgFetch</var>’s <a data-link-type="dfn" href="#background-fetch-records" id="ref-for-background-fetch-records③">records</a>.</p> |
1941 |
| - <li data-md=""> |
1942 |
| - <p>Initialise <var>event</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> to <var>eventType</var>.</p> |
1943 |
| - <li data-md=""> |
1944 |
| - <p>Initialise <var>event</var>’s <code class="idl"><a data-link-type="idl" href="#dom-backgroundfetchsettledevent-fetches" id="ref-for-dom-backgroundfetchsettledevent-fetches">fetches</a></code> to <var>settledFetches</var>.</p> |
1945 |
| - <li data-md=""> |
1946 |
| - <p>Dispatch a service worker event <var>event</var>.</p> |
1947 |
| - <p class="issue" id="issue-f46bb3b7"><a class="self-link" href="#issue-f46bb3b7"></a> Also part of the previous <a href="https://github.com/w3c/ServiceWorker/issues/1196">issue</a>.</p> |
1948 |
| - </ol> |
| 1932 | + <p><a data-link-type="dfn">Fire a functional event</a> named "<code>backgroundfetchabort</code>" using <code class="idl"><a data-link-type="idl" href="#backgroundfetchsettledevent" id="ref-for-backgroundfetchsettledevent">BackgroundFetchSettledEvent</a></code> on <var>swRegistration</var> with the following properties:</p> |
| 1933 | + <dl> |
| 1934 | + <dt data-md=""><code class="idl"><a data-link-type="idl" href="#dom-backgroundfetchsettledevent-fetches" id="ref-for-dom-backgroundfetchsettledevent-fetches">fetches</a></code> |
| 1935 | + <dd data-md=""> |
| 1936 | + <p>A new <code class="idl"><a data-link-type="idl" href="#backgroundfetchsettledfetches" id="ref-for-backgroundfetchsettledfetches">BackgroundFetchSettledFetches</a></code>. TODO: associate this with <var>bgFetch</var>’s <a data-link-type="dfn" href="#background-fetch-records" id="ref-for-background-fetch-records③">records</a>.</p> |
| 1937 | + </dl> |
| 1938 | + <p class="issue" id="issue-75d0102a"><a class="self-link" href="#issue-75d0102a"></a> The above prose is based on <a href="https://github.com/w3c/ServiceWorker/pull/1199">ServiceWorker/#1199</a>.</p> |
1949 | 1939 | </ol>
|
1950 | 1940 | </ol>
|
1951 | 1941 | </div>
|
@@ -2370,8 +2360,6 @@ <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span cla
|
2370 | 2360 | <ul>
|
2371 | 2361 | <li><a href="https://dom.spec.whatwg.org/#eventtarget">EventTarget</a>
|
2372 | 2362 | <li><a href="https://dom.spec.whatwg.org/#context-object">context object</a>
|
2373 |
| - <li><a href="https://dom.spec.whatwg.org/#concept-event-create">creating an event</a> |
2374 |
| - <li><a href="https://dom.spec.whatwg.org/#dom-event-type">type</a> |
2375 | 2363 | </ul>
|
2376 | 2364 | <li>
|
2377 | 2365 | <a data-link-type="biblio">[FETCH]</a> defines the following terms:
|
@@ -2447,7 +2435,6 @@ <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span cla
|
2447 | 2435 | <li><a href="https://w3c.github.io/ServiceWorker/#serviceworkerglobalscope">ServiceWorkerGlobalScope</a>
|
2448 | 2436 | <li><a href="https://w3c.github.io/ServiceWorker/#serviceworkerregistration">ServiceWorkerRegistration</a>
|
2449 | 2437 | <li><a href="https://w3c.github.io/ServiceWorker/#dfn-active-worker">active worker</a>
|
2450 |
| - <li><a href="https://w3c.github.io/ServiceWorker/#handle-functional-event">handle functional event</a> |
2451 | 2438 | <li><a href="https://w3c.github.io/ServiceWorker/#dfn-service-worker">service worker</a>
|
2452 | 2439 | <li><a href="https://w3c.github.io/ServiceWorker/#dfn-service-worker-registration">service worker registration</a>
|
2453 | 2440 | <li><a href="https://w3c.github.io/ServiceWorker/#dom-extendableevent-waituntil">waitUntil(f)</a>
|
@@ -2600,8 +2587,7 @@ <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content
|
2600 | 2587 | <div class="issue"> Fetch waits for the whole body before returning <var>response</var>. Let’s pretend it <em>doesn’t</em> do that <a href="https://github.com/whatwg/fetch/issues/536#issuecomment-330184276">issue</a>.<a href="#issue-ba3b5fd8"> ↵ </a></div>
|
2601 | 2588 | <div class="issue"> Fetch doesn’t currently expose this <a href="https://github.com/whatwg/fetch/issues/605">(issue)</a>.<a href="#issue-8840f7f0"> ↵ </a></div>
|
2602 | 2589 | <div class="issue"> This isn’t correctly set in fetch (<a href="https://github.com/whatwg/fetch/issues/604">issue</a>).<a href="#issue-9b0afb74"> ↵ </a></div>
|
2603 |
| - <div class="issue"> This isn’t quite how <a data-link-type="dfn" href="https://w3c.github.io/ServiceWorker/#handle-functional-event">handle functional event</a> works, but its current definition doesn’t really make sense (<a href="https://github.com/w3c/ServiceWorker/issues/1196">issue</a>).<a href="#issue-ea032efd"> ↵ </a></div> |
2604 |
| - <div class="issue"> Also part of the previous <a href="https://github.com/w3c/ServiceWorker/issues/1196">issue</a>.<a href="#issue-f46bb3b7"> ↵ </a></div> |
| 2590 | + <div class="issue"> The above prose is based on <a href="https://github.com/w3c/ServiceWorker/pull/1199">ServiceWorker/#1199</a>.<a href="#issue-75d0102a"> ↵ </a></div> |
2605 | 2591 | </div>
|
2606 | 2592 | <aside class="dfn-panel" data-for="service-worker-registration-active-background-fetches">
|
2607 | 2593 | <b><a href="#service-worker-registration-active-background-fetches">#service-worker-registration-active-background-fetches</a></b><b>Referenced in:</b>
|
|
0 commit comments