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>

Sorry, I had to be clearer. They were cancelable in the original text too. (I presume the previous text in DOM wanted me to write it'd be cancelable by default if not explicitly called it's not cancelable? Ignore me if it was not.)

Handle Fetch step 21.1. (https://w3c.github.io/ServiceWorker/#on-fetch-request-algorithm) checks the value set by event's canceled flag.

-- 
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 11:08:03 UTC