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; type: interface; text: Document -spec: html; type: element; text: link -spec: url; type: dfn; text: is local +spec: dom; + type: interface; text: Document +spec: html; + type: element; text: link + type: dfn; text: task queues; for: /
-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/rfc7231A 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/rfc7231fetch
{{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.) @@ -3115,7 +3049,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231 message
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. @@ -3145,7 +3079,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231In 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.
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:
@@ -3317,7 +3317,7 @@
- Let operations be an empty array.
- @@ -3225,7 +3225,7 @@
Batch Cache Operations algorithm 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:
- Let responseBodyPromiseArray be an empty array.
- @@ -3266,8 +3266,8 @@
waiting for all of responseBodyPromiseArray. -
- Return the result of transforming q with a fulfillment handler that returns undefined. +
- Let q be waiting for all of responseBodyPromiseArray. +
- Return the result of transforming q with a fulfillment handler that returns undefined.
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:
- 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.
- @@ -3374,7 +3374,7 @@
Batch Cache Operations passing operations as the argument.
- - 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:
- If responseArray is not null, return true.
- Else, return false. @@ -3472,7 +3472,7 @@
Record {[[key]], [[value]]} entry of its name to cache map, in key insertion order:
- - 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:
- If v is not undefined, return v.
- Return the result of running the algorithm specified in
match(request, options)
method ofCache
interface with request and options as the arguments (providing entry.[[value]] as thisArgument to the [[Call]] internal method ofmatch(request, options)
.) @@ -3533,7 +3533,7 @@
- Let p be the result of running the algorithm specified in
has(cacheName)
method with cacheName as the argument.- - 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:
- If cacheExists is true, then: @@ -4044,7 +4044,7 @@
In WaitForAsynchronousExtensions: Run the following substeps in parallel:
- Wait until e’s extensions allowed flag is unset. -
- If the result of waiting for all of e’s extend lifetime promises rejected, set installFailed to true. +
- 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.
- - 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:
- Let itemsCopy be a new request to response map that is a copy of its context object’s request to response map.
- Let addedRecords be an empty array. @@ -5310,6 +5310,7 @@
Event
- EventInit
- EventTarget +
- ascii case-insensitive
- canceled flag
- context object
- dispatch @@ -5320,11 +5321,6 @@
stop immediate propagation flag
- stop propagation flag -
- - [dom-ls] defines the following terms: -
- [ECMASCRIPT] defines the following terms:
@@ -5481,11 +5477,11 @@
run a module script
- same origin
- script -
- shared workers +
- shared worker
- source browsing context
- target browsing context
- task -
- task queue +
- task queues
- task source
- terminate a worker
- the worker's documents @@ -5508,8 +5504,8 @@
[promises-guide] defines the following terms:
- [quota-api] defines the following terms: @@ -5585,7 +5581,7 @@
N
- [PAGE-VISIBILITY]
- Jatinder Mann; Arvind Jain. Page Visibility (Second Edition). 29 October 2013. REC. URL: https://www.w3.org/TR/page-visibility/
- [PROMISES-GUIDE] -
- Writing Promise-Using Specifications. 24 July 2015. Finding of the W3C TAG. URL: https://www.w3.org/2001/tag/doc/promises-guide +
- Domenic Denicola. Writing Promise-Using Specifications. 16 February 2016. Finding of the W3C TAG. URL: https://www.w3.org/2001/tag/doc/promises-guide
- [QUOTA-API]
- Kinuko Yasuda. Quota Management API. URL: https://w3c.github.io/quota-api/
- [RFC2119]