diff --git a/docs/v1/index.bs b/docs/v1/index.bs index 92bf4ad9..257aa37c 100644 --- a/docs/v1/index.bs +++ b/docs/v1/index.bs @@ -22,13 +22,6 @@ Markup Shorthands: css no
 {
-  "promises-guide": {
-    "href": "https://www.w3.org/2001/tag/doc/promises-guide",
-    "title": "Writing Promise-Using Specifications",
-    "date": "24 July 2015",
-    "status": "Finding of the W3C TAG",
-    "publisher": "W3C TAG"
-  },
   "unsanctioned-tracking": {
     "href": "https://www.w3.org/2001/tag/doc/unsanctioned-tracking/",
     "title": "Unsanctioned Web Tracking",
@@ -40,13 +33,15 @@ Markup Shorthands: css no
 
-spec: dom-ls; urlPrefix: https://dom.spec.whatwg.org/
+spec: DOM; urlPrefix: https://dom.spec.whatwg.org/
     type: dfn; text: ASCII case-insensitive; url: ascii-case-insensitive
 
 spec: ecma-262; urlPrefix: http://tc39.github.io/ecma262/
@@ -66,29 +61,20 @@ spec: csp2; urlPrefix: https://w3c.github.io/webappsec-csp/2/
 
 spec: fetch; urlPrefix: https://fetch.spec.whatwg.org/
     type: dfn
-        text: basic filtered response; url: concept-filtered-response-basic
         text: cancel a ReadableStream; url: concept-cancel-readablestream
         text: close ReadableStream; url: concept-close-readablestream
         text: construct a ReadableStream; url: concept-construct-readablestream
-        text: CORS filtered response; url: concept-filtered-response-cors
         text: disturbed; url: concept-body-disturbed
         text: empty; url: concept-empty-readablestream
         text: enqueue a chunk to ReadableStream; url: concept-enqueue-readablestream
         text: error ReadableStream; url: concept-error-readablestream
         text: errored; url: concept-readablestream-errored
-        text: extract a mime type; url: concept-header-extract-mime-type
         text: fetch; url: concept-fetch
-        text: filtered response; url: concept-filtered-response
         text: get a reader; url: concept-get-reader
-        text: header; url: concept-header
         text: http fetch; url: concept-http-fetch
         text: HTTPS state value; url: concept-https-state-value
         text: internal response; url: concept-internal-response
         text: locked; url: concept-body-locked
-        text: navigation request
-        text: network error; url: concept-network-error
-        text: non-subresource request
-        text: ok status; url: ok-status
         text: opaque filtered response; url: concept-filtered-response-opaque
         text: potential-navigation-or-subresource request
         text: process response
@@ -100,8 +86,6 @@ spec: fetch; urlPrefix: https://fetch.spec.whatwg.org/
         text: response; for: fetch; url: concept-response
         text: skip service worker flag
         text: stream; url: concept-body-stream
-        text: subresource request
-        text: synchronous flag
         text: terminate; url: concept-fetch-terminate
         text: guard; for: headers; url: concept-headers-guard
         for: Body; urlPrefix: #concept-body-
@@ -110,61 +94,16 @@ spec: fetch; urlPrefix: https://fetch.spec.whatwg.org/
             text: name
             text: parsing; url: parse
         for: request; urlPrefix: #concept-request-
-            text: cache mode
-            text: client
-            text: destination
-            text: header list
-            text: initiator
-            text: method
-            text: redirect mode
             text: request
-            text: reserved client
-            text: target client id
-            text: url
+            text: origin
         for: response; urlPrefix: #concept-response-
-            text: body
-            text: cache state
-            text: header list
-            text: https state
             text: response
-            text: status
-            text: termination reason
-            text: type
-    type: interface
-        text: Headers
-        text: Request
-        text: RequestInfo
-        text: Response
-    type: attribute; for: Request
-        text: headers; url: dom-request-headers
-    type: method
-        text: get(name); for: Headers; url: dom-headers-get
-        text: fetch(input, init); for: GlobalFetch; url: dom-global-fetch
 
 spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/
     type: dfn
         urlPrefix: browsers.html
             text: ancestor origins array; for: Location; url: concept-location-ancestor-origins-array
             text: origin; for: resource; url: origin-2
-        urlPrefix: interaction.html
-            text: has focus steps
-        urlPrefix: webappapis.html
-            text: dom manipulation task source
-            text: environment
-            text: run a classic script
-            text: run a module script
-            text: task queue; for: event loop
-            for: environment; urlPrefix: #concept-environment-
-                text: active service worker
-                text: creation URL
-                text: id
-        urlPrefix: workers.html
-            text: shared workers
-            text: web worker; url: workers
-    type: event
-        urlPrefix: indices.html
-            text: DOMContentLoaded; for: Document; url: event-domcontentloaded
-            text: message; for: Window; url: event-message
 
 spec: page-visibility; urlPrefix: https://www.w3.org/TR/page-visibility/
     type: enum; text: VisibilityState; url: VisibilityState
@@ -177,11 +116,6 @@ spec: secure-contexts; urlPrefix: https://w3c.github.io/webappsec-secure-context
         text: risks associated with insecure contexts; url: threat-risks
         text: secure context
 
-spec: promises-guide; urlPrefix: https://www.w3.org/2001/tag/doc/promises-guide#
-    type: dfn
-        text: waiting for all
-        text: transforming; url: transforming-by
-
 spec: quota-api; urlPrefix: http://www.w3.org/TR/quota-api/
     type: attribute; for: ServiceWorkerGlobalScope
         text: onbeforeevicted; url: widl-ServiceWorkerGlobalScope-onbeforeevicted
@@ -256,7 +190,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
     

A service worker registration has an associated active worker (a service worker or null) whose state is either activating or activated. It is initially set to null.

A service worker registration has an associated last update check time. It is initially set to null.

A service worker registration has an associated uninstalling flag. It is initially unset.

-

A service worker registration has one or more task queues that back up the tasks from its active worker's event loop's corresponding task queues. (The target task sources for this back up operation are the handle fetch task source and the handle functional event task source.) The user agent dumps the active worker's tasks to the service worker registration's task queues when the active worker is terminated and re-queues those tasks to the active worker's event loop's corresponding task queues when the active worker spins off. Unlike the task queues owned by event loops, the service worker registration's task queues are not processed by any event loops in and of itself.

+

A service worker registration has one or more task queues that back up the tasks from its active worker's event loop's corresponding task queues. (The target task sources for this back up operation are the handle fetch task source and the handle functional event task source.) The user agent dumps the active worker's tasks to the service worker registration's task queues when the active worker is terminated and re-queues those tasks to the active worker's event loop's corresponding task queues when the active worker spins off. Unlike the task queues owned by event loops, the service worker registration's task queues are not processed by any event loops in and of itself.

Lifetime

@@ -1781,7 +1715,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231 fetch {{FetchEvent}} - [Functional event] The http fetch invokes Handle Fetch with request. As a result of performing Handle Fetch, the service worker returns a response to the http fetch. The response, represented by a {{Response}} object, can be retrieved from a {{Cache}} object or directly from network using {{GlobalFetch/fetch(input, init)|self.fetch(input, init)}} method. (A custom {{Response}} object can be another option.) + [Functional event] The http fetch invokes Handle Fetch with request. As a result of performing Handle Fetch, the service worker returns a response to the http fetch. The response, represented by a {{Response}} object, can be retrieved from a {{Cache}} object or directly from network using {{WindowOrWorkerGlobalScope/fetch(input, init)|self.fetch(input, init)}} method. (A custom {{Response}} object can be another option.) message @@ -3115,7 +3049,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
  • Set workerGlobalScope's referrer policy to serviceWorker's script resource's referrer policy.
  • Set workerGlobalScope's type to serviceWorker's type.
  • Create a new {{WorkerLocation}} object and associate it with workerGlobalScope.
  • -
  • If serviceWorker is an active worker, and there are any tasks queued in serviceWorker's containing service worker registration's task queues, queue them to serviceWorker's event loop's task queues in the same order using their original task sources.
  • +
  • If serviceWorker is an active worker, and there are any tasks queued in serviceWorker's containing service worker registration's task queues, queue them to serviceWorker's event loop's task queues in the same order using their original task sources.
  • If script is a classic script, then run the classic script script. Otherwise, it is a module script; run the module script script.

    In addition to the usual possibilities of returning a value or failing due to an exception, this could be prematurely aborted by the kill a worker or terminate a worker algorithms.

  • @@ -3145,7 +3079,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
  • If serviceWorker is not running, abort these steps.
  • Let serviceWorkerGlobalScope be serviceWorker's environment settings object's global object.
  • Set serviceWorkerGlobalScope's closing flag to true.
  • -
  • If there are any tasks, whose task source is either the handle fetch task source or the handle functional event task source, queued in serviceWorkerGlobalScope's event loop's task queues, queue them to serviceWorker's containing service worker registration's corresponding task queues in the same order using their original task sources, and discard all the tasks (including tasks whose task source is neither the handle fetch task source nor the handle functional event task source) from serviceWorkerGlobalScope's event loop's task queues without processing them. +
  • If there are any tasks, whose task source is either the handle fetch task source or the handle functional event task source, queued in serviceWorkerGlobalScope's event loop's task queues, queue them to serviceWorker's containing service worker registration's corresponding task queues in the same order using their original task sources, and discard all the tasks (including tasks whose task source is neither the handle fetch task source nor the handle functional event task source) from serviceWorkerGlobalScope's event loop's task queues without processing them.

    This effectively means that the fetch events and the other functional events such as push events are backed up by the registration's task queues while the other tasks including message events are discarded.

  • Abort the script currently running in serviceWorker.
  • diff --git a/docs/v1/index.html b/docs/v1/index.html index 318373dd..85a578c0 100644 --- a/docs/v1/index.html +++ b/docs/v1/index.html @@ -1422,7 +1422,7 @@

    Service Workers 1

    -

    Editor’s Draft,

    +

    Editor’s Draft,

    This version: @@ -3152,7 +3152,7 @@

    addAll(requests) passing requests as the argument. -
  • Return the result of transforming responseArrayPromise with a fulfillment handler that returns undefined. +
  • Return the result of transforming responseArrayPromise with a fulfillment handler that returns undefined.
  • @@ -3209,9 +3209,9 @@

    waiting for all of responsePromiseArray. +
  • Let p be waiting for all of responsePromiseArray.
  • - Return the result of transforming p with a fulfillment handler that, when called with argument responseArray, performs the following substeps in parallel: + Return the result of transforming p with a fulfillment handler that, when called with argument responseArray, performs the following substeps in parallel:
    1. Let operations be an empty array.
    2. @@ -3225,7 +3225,7 @@

      Batch Cache Operations algorithm passing operations as the argument.
    3. - Return the result of transforming resultPromise with a fulfillment handler that, when called with argument responses, performs the following substeps in parallel: + Return the result of transforming resultPromise with a fulfillment handler that, when called with argument responses, performs the following substeps in parallel:
      1. Let responseBodyPromiseArray be an empty array.
      2. @@ -3266,8 +3266,8 @@

        waiting for all of responseBodyPromiseArray. -
      3. Return the result of transforming q with a fulfillment handler that returns undefined. +
      4. Let q be waiting for all of responseBodyPromiseArray. +
      5. Return the result of transforming q with a fulfillment handler that returns undefined.
    @@ -3317,7 +3317,7 @@

    Batch Cache Operations passing operations as the argument.
  • - Return the result of transforming resultPromise with a fulfillment handler that, when called with argument responses, performs the following substeps in parallel: + Return the result of transforming resultPromise with a fulfillment handler that, when called with argument responses, performs the following substeps in parallel:
    1. Wait for either end-of-file to have been pushed to responses[0]'s associated response r’s body or for r to have a termination reason.
    2. @@ -3374,7 +3374,7 @@

      Batch Cache Operations passing operations as the argument.
    3. - Return the result of transforming resultPromise with a fulfillment handler, when called with argument responseArray, performs the following substeps in parallel: + Return the result of transforming resultPromise with a fulfillment handler, when called with argument responseArray, performs the following substeps in parallel:
      1. If responseArray is not null, return true.
      2. Else, return false. @@ -3472,7 +3472,7 @@

        Record {[[key]], [[value]]} entry of its name to cache map, in key insertion order:
        1. - Set p to the result of transforming itself with a fulfillment handler that, when called with argument v, performs the following substeps in parallel: + Set p to the result of transforming itself with a fulfillment handler that, when called with argument v, performs the following substeps in parallel:
          1. If v is not undefined, return v.
          2. Return the result of running the algorithm specified in match(request, options) method of Cache interface with request and options as the arguments (providing entry.[[value]] as thisArgument to the [[Call]] internal method of match(request, options).) @@ -3533,7 +3533,7 @@

          3. Let p be the result of running the algorithm specified in has(cacheName) method with cacheName as the argument.
          4. - Return the result of transforming p with a fulfillment handler that, when called with argument cacheExists, performs the following substeps in parallel: + Return the result of transforming p with a fulfillment handler that, when called with argument cacheExists, performs the following substeps in parallel:
            1. If cacheExists is true, then: @@ -4044,7 +4044,7 @@

              In WaitForAsynchronousExtensions: Run the following substeps in parallel:
              1. Wait until e’s extensions allowed flag is unset. -
              2. If the result of waiting for all of e’s extend lifetime promises rejected, set installFailed to true. +
              3. If the result of waiting for all of e’s extend lifetime promises rejected, set installFailed to true.

            If task is discarded or the script has been aborted by the termination of installingWorker, set installFailed to true.

            @@ -4774,7 +4774,7 @@

            promise resolved with no value.
          5. - Return the result of transforming p with a fulfillment handler that performs the following substeps in parallel: + Return the result of transforming p with a fulfillment handler that performs the following substeps in parallel:
            1. Let itemsCopy be a new request to response map that is a copy of its context object’s request to response map.
            2. Let addedRecords be an empty array. @@ -5310,6 +5310,7 @@

              Event
            3. EventInit
            4. EventTarget +
            5. ascii case-insensitive
            6. canceled flag
            7. context object
            8. dispatch @@ -5320,11 +5321,6 @@

              stop immediate propagation flag
            9. stop propagation flag -
            10. - [dom-ls] defines the following terms: -
            11. [ECMASCRIPT] defines the following terms: