Re: [w3c/ServiceWorker] Introduce Extend Service Worker Lifetime algorithm (#1010)

jungkees commented on this pull request.



> @@ -3426,13 +3440,16 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
       <li>Invoke <a href="#run-service-worker-algorithm">Run Service Worker</a> algorithm with <var>activeWorker</var> as the argument.</li>
       <li><a>Queue a task</a> <var>task</var> to run the following substeps:
         <ol>
-          <li>Create a trusted event <var>e</var> that uses the {{FetchEvent}} interface, with the event type <code><a href="#service-worker-global-scope-fetch-event">fetch</a></code>, which does not bubble.</li>
-          <li>Let the {{FetchEvent/request}} attribute of <var>e</var> be initialized to <var>r</var>.</li>
+          <li><a>Create an event</a> <var>e</var> with the {{FetchEvent}} interface.</li>
+          <li>Initialize <var>e</var>’s {{Event/type}} attribute to "<code>fetch</code>".</li>
+          <li>Initialize <var>e</var>’s {{Event/cancelable}} attribute to true.</li>

Note that fetch and foreignfetch are cancelable. When they're canceled without calling respondWith(), it returns network error. See https://github.com/w3c/ServiceWorker/issues/51#issuecomment-51172079.

FYI. install and activate are not cancelable as you pointed.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1010

Received on Tuesday, 22 November 2016 10:51:57 UTC