From 58be22d7ffdb743db406c02175b9268569c3e1f5 Mon Sep 17 00:00:00 2001 From: Jungkee Song Date: Fri, 4 Nov 2016 20:07:59 +0900 Subject: [PATCH] Remove frameType and add ancestorOrigins This removes client.frameType attribute and adds windowClient.ancestorOrigins attribute instead. The rationale behind this decision is there has not been any solid use cases for frameType, and ancestorOrigins provides more information to deal with embedded frame structures. Fixes#732 --- docs/index.bs | 73 ++++----- docs/index.html | 358 +++++++++++++++++++++------------------------ docs/v1/index.bs | 73 ++++----- docs/v1/index.html | 354 ++++++++++++++++++++------------------------ 4 files changed, 386 insertions(+), 472 deletions(-) diff --git a/docs/index.bs b/docs/index.bs index 0f1d0c18..0bd53993 100644 --- a/docs/index.bs +++ b/docs/index.bs @@ -149,6 +149,7 @@ spec: fetch; urlPrefix: https://fetch.spec.whatwg.org/ 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: infrastructure.html text: inserted into a document; url: insert-an-element-into-a-document @@ -285,8 +286,6 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231

Service Worker Client

A service worker client is a type of environment or environment settings object.

-

A service worker client has an associated frame type, which is one of auxiliary, top-level, nested, and none. Unless stated otherwise it is none. -

A service worker client has an algorithm defined as the origin that returns the service worker client's creation URL's origin if the service worker client is a type of environment, and the service worker client's origin otherwise.

A window client is a service worker client whose global object is a {{Window}} object.

@@ -1056,7 +1055,6 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231 [Exposed=ServiceWorker] interface Client { readonly attribute USVString url; - readonly attribute FrameType frameType; readonly attribute DOMString id; readonly attribute boolean reserved; void postMessage(any message, optional sequence<object> transfer = []); @@ -1066,16 +1064,10 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231 interface WindowClient : Client { readonly attribute VisibilityState visibilityState; readonly attribute boolean focused; + [SameObject] readonly attribute FrozenArray<USVString> ancestorOrigins; [NewObject] Promise<WindowClient> focus(); [NewObject] Promise<WindowClient> navigate(USVString url); }; - - enum FrameType { - "auxiliary", - "top-level", - "nested", - "none" - };

A Client object has an associated service worker client (a service worker client).

@@ -1084,35 +1076,14 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231

A {{WindowClient}} object has an associated focus state, which is either true or false (initially false).

+

A {{WindowClient}} object has an associated ancestor origins array.

+

{{Client/url}}

The url attribute must return the context object's associated service worker client's serialized creation URL.

-
-

{{Client/frameType}}

- -

The frameType attribute must return the value (in FrameType enumeration) corresponding to the first matching statement, switching on service worker client's frame type:

- -
-
auxiliary
-
"auxiliary" -

The window client's global object's browsing context is an auxiliary browsing context.

- -
top-level
-
"top-level" -

The window client's global object's browsing context is a top-level browsing context.

- -
nested
-
"nested" -

The window client's global object's browsing context is a nested browsing context.

- -
none
-
"none"
-
-
-

{{Client/id}}

@@ -1165,6 +1136,12 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231

The focused attribute must return the context object's focus state.

+
+

{{WindowClient/ancestorOrigins}}

+ +

The ancestorOrigins attribute must return the context object's associated service worker client's ancestor origins array.

+
+

{{WindowClient/focus()}}

@@ -1177,16 +1154,18 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
  1. Let browsingContext be the context object's associated service worker client's global object's browsing context.
  2. Let visibilityState be null.
  3. -
  4. Let focusState be null.
  5. +
  6. Let focusState be false.
  7. +
  8. Let ancestorOrigins be the empty array.
  9. Queue a task task to run the following substeps on the context object's associated service worker client's responsible event loop using the user interaction task source:
    1. Run the focusing steps with browsingContext.
    2. Set visibilityState to browsingContext's active document's {{Document/visibilityState}} attribute value.
    3. Set focusState to the result of running the has focus steps with browsingContext's active document as the argument.
    4. +
    5. Set ancestorOrigins to browsingContext's active document's relevant global object's {{Location}} object's ancestor origins array.
  10. Wait for task to have executed.
  11. -
  12. Let windowClient be the result of running Create Window Client algorithm with the context object's associated service worker client, visibilityState and focusState as the arguments.
  13. +
  14. Let windowClient be the result of running Create Window Client algorithm with the context object's associated service worker client, visibilityState, focusState, and ancestorOrigins as the arguments.
  15. If windowClient's focus state is true, resolve promise with windowClient.
  16. Else, reject promise with a TypeError.
@@ -1212,13 +1191,15 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
  • If browsingContext has discarded its {{Document}}, reject promise with a TypeError and abort these steps.
  • Let navigateFailed to false.
  • Let visibilityState be null.
  • -
  • Let focusState be null.
  • +
  • Let focusState be false.
  • +
  • Let ancestorOrigins be the empty array.
  • Queue a task task to run the following substeps on the context object's associated service worker client's responsible event loop using the user interaction task source:
    1. HandleNavigate: Navigate browsingContext to url with exceptions enabled. The source browsing context must be browsingContext.
    2. If the algorithm steps invoked in the step labeled HandleNavigate throws an exception, set navigateFailed to true.
    3. Set visibilityState to browsingContext's active document's {{Document/visibilityState}} attribute value.
    4. Set focusState to the result of running the has focus steps with browsingContext's active document as the argument.
    5. +
    6. Set ancestorOrigins to browsingContext's active document's relevant global object's {{Location}} object's ancestor origins array.
  • Wait for task to have executed (including its asynchronous steps).
  • @@ -1229,7 +1210,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
  • Abort these steps.
  • -
  • Let windowClient be the result of running Create Window Client algorithm with browsingContext's {{Window}} object's environment settings object, visibilityState and focusState as the arguments.
  • +
  • Let windowClient be the result of running Create Window Client algorithm with browsingContext's {{Window}} object's environment settings object, visibilityState, focusState, and ancestorOrigins as the arguments.
  • Resolve promise with windowClient.
  • @@ -1295,17 +1276,19 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
    1. Let browsingContext be null.
    2. Let visibilityState be null.
    3. -
    4. Let focusState be null.
    5. +
    6. Let focusState be false.
    7. +
    8. Let ancestorOrigins be the empty array.
    9. If client is a type of environment, set browsingContext to client’s target browsing context.
    10. Else, set browsingContext to client's global object's browsing context.
    11. Queue a task task to run the following substeps on browsingContext's event loop using the user interaction task source:
      1. Set visibilityState to browsingContext's active document's {{Document/visibilityState}} attribute value.
      2. Set focusState to the result of running the has focus steps with browsingContext's active document as the argument.
      3. +
      4. If client is a window client, set ancestorOrigins to browsingContext's active document's relevant global object's {{Location}} object's ancestor origins array.
    12. Wait for task to have executed.
    13. -
    14. Let windowClient be the result of running Create Window Client algorithm with client, visibilityState and focusState as the arguments.
    15. +
    16. Let windowClient be the result of running Create Window Client algorithm with client, visibilityState, focusState, and ancestorOrigins as the arguments.
    17. Resolve promise with windowClient and abort these steps.
    @@ -1368,6 +1351,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
  • Let isClientEnumerable be true.
  • Let visibilityState be the empty string.
  • Let focusState be false.
  • +
  • Let ancestorOrigins be the empty array.
  • If client is a type of environment, set browsingContext to client’s target browsing context.
  • Else, set browsingContext to client's global object's browsing context.
  • Queue a task task to run the following substeps on browsingContext's event loop using the user interaction task source: @@ -1376,6 +1360,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
  • If client is a window client and client's responsible document is not browsingContext's active document, set isClientEnumerable to false and abort these steps.
  • Set visibilityState to browsingContext's active document's {{Document/visibilityState}} attribute value.
  • Set focusState to the result of running the has focus steps with browsingContext's active document as the argument.
  • +
  • It client is a window client, set ancestorOrigins to browsingContext's active document's relevant global object's {{Location}} object's ancestor origins array.
  • Wait for task to have executed. @@ -1383,7 +1368,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
  • If isClientEnumerable is true, then:
      -
    1. Let windowClient be the result of running Create Window Client algorithm with client, visibilityState and focusState as the arguments.
    2. +
    3. Let windowClient be the result of running Create Window Client algorithm with client, visibilityState, focusState, and ancestorOrigins as the arguments.
    4. Add windowClient to matchedClients.
  • @@ -1420,13 +1405,15 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
  • Let newContext be a new top-level browsing context.
  • Let openWindowFailed to false.
  • Let visibilityState be null.
  • -
  • Let focusState be null.
  • +
  • Let focusState be false.
  • +
  • Let ancestorOrigins be the empty array.
  • Queue a task task to run the following substeps on newContext's {{Window}} object's environment settings object's responsible event loop using the user interaction task source:
    1. HandleNavigate: Navigate newContext to url with exceptions enabled and replacement enabled.
    2. If the algorithm steps invoked in the step labeled HandleNavigate throws an exception, set openWindowFailed to true.
    3. Set visibilityState to newContext's active document's {{Document/visibilityState}} attribute value.
    4. Set focusState to the result of running the has focus steps with newContext's active document as the argument.
    5. +
    6. Set ancestorOrigins to newContext's active document's relevant global object's {{Location}} object's ancestor origins array.
  • Wait for task to have executed (including its asynchronous steps).
  • @@ -1437,7 +1424,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
  • Abort these steps.
  • -
  • Let client be the result of running Create Window Client algorithm with newContext's {{Window}} object's environment settings object, visibilityState and focusState as the arguments.
  • +
  • Let client be the result of running Create Window Client algorithm with newContext's {{Window}} object's environment settings object, visibilityState, focusState, and ancestorOrigins as the arguments.
  • Resolve promise with client.
  • @@ -4102,6 +4089,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
    client, a service worker client
    visibilityState, a string
    focusState, a boolean
    +
    ancestorOrigins, an array
    Output
    windowClient, a {{WindowClient}} object
    @@ -4110,6 +4098,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
  • Set windowClient's service worker client to client.
  • Set windowClient's visibility state to visibilityState.
  • Set windowClient's focus state to focusState.
  • +
  • Set windowClient's ancestor origins array to ancestorOrigins.
  • Return windowClient.
  • diff --git a/docs/index.html b/docs/index.html index 93fd39cf..ad8118fe 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1552,12 +1552,12 @@

    Table of Contents

    4.2 Client
    1. 4.2.1 url -
    2. 4.2.2 frameType -
    3. 4.2.3 id -
    4. 4.2.4 reserved -
    5. 4.2.5 postMessage(message, transfer) -
    6. 4.2.6 visibilityState -
    7. 4.2.7 focused +
    8. 4.2.2 id +
    9. 4.2.3 reserved +
    10. 4.2.4 postMessage(message, transfer) +
    11. 4.2.5 visibilityState +
    12. 4.2.6 focused +
    13. 4.2.7 ancestorOrigins
    14. 4.2.8 focus()
    15. 4.2.9 navigate(url)
    @@ -1793,19 +1793,18 @@

    2.3. Service Worker Client

    A service worker client is a type of environment or environment settings object.

    -

    A service worker client has an associated frame type, which is one of auxiliary, top-level, nested, and none. Unless stated otherwise it is none.

    -

    A service worker client has an algorithm defined as the origin that returns the service worker client’s creation URL’s origin if the service worker client is a type of environment, and the service worker client’s origin otherwise.

    -

    A window client is a service worker client whose global object is a Window object.

    -

    A dedicated worker client is a service worker client whose global object is a DedicatedWorkerGlobalScope object.

    -

    A shared worker client is a service worker client whose global object is a SharedWorkerGlobalScope object.

    +

    A service worker client has an algorithm defined as the origin that returns the service worker client’s creation URL’s origin if the service worker client is a type of environment, and the service worker client’s origin otherwise.

    +

    A window client is a service worker client whose global object is a Window object.

    +

    A dedicated worker client is a service worker client whose global object is a DedicatedWorkerGlobalScope object.

    +

    A shared worker client is a service worker client whose global object is a SharedWorkerGlobalScope object.

    A worker client is either a dedicated worker client or a shared worker client.

    2.4. Selection and Use

    -

    A service worker client independently selects and uses a service worker registration for its own loading and its subresources. The selection of a service worker registration, upon a non-subresource request, is a process of either matching a service worker registration from scope to registration map or inheriting an existing service worker registration from its parent or owner context depending on the request’s url.

    -

    When the request’s url is not local, a service worker client matches a service worker registration from scope to registration map. That is, the service worker client attempts to consult a service worker registration whose scope url matches its creation URL.

    -

    When the request’s url is local, if the service worker client’s responsible browsing context is a nested browsing context or the service worker client is a worker client, the service worker client inherits the service worker registration from its parent browsing context’s environment or one of the worker’s Documents' environment, respectively, if it exists.

    -

    If the selection was successful, the selected service worker registration’s active worker starts to control the service worker client. Otherwise, the flow returns to fetch where it falls back to the default behavior. When a service worker client is controlled by an active worker, it is considered that the service worker client is using the active worker’s containing service worker registration.

    +

    A service worker client independently selects and uses a service worker registration for its own loading and its subresources. The selection of a service worker registration, upon a non-subresource request, is a process of either matching a service worker registration from scope to registration map or inheriting an existing service worker registration from its parent or owner context depending on the request’s url.

    +

    When the request’s url is not local, a service worker client matches a service worker registration from scope to registration map. That is, the service worker client attempts to consult a service worker registration whose scope url matches its creation URL.

    +

    When the request’s url is local, if the service worker client’s responsible browsing context is a nested browsing context or the service worker client is a worker client, the service worker client inherits the service worker registration from its parent browsing context’s environment or one of the worker’s Documents' environment, respectively, if it exists.

    +

    If the selection was successful, the selected service worker registration’s active worker starts to control the service worker client. Otherwise, the flow returns to fetch where it falls back to the default behavior. When a service worker client is controlled by an active worker, it is considered that the service worker client is using the active worker’s containing service worker registration.

    2.5. Task Sources

    @@ -1985,7 +1984,7 @@

    -

    The unregister() method unregisters the service worker registration. It is important to note that the currently controlled service worker client’s active service worker’s containing service worker registration is effective until all the service worker clients (including itself) using this service worker registration unload. That is, the unregister() method only affects subsequent navigations.

    +

    The unregister() method unregisters the service worker registration. It is important to note that the currently controlled service worker client’s active service worker’s containing service worker registration is effective until all the service worker clients (including itself) using this service worker registration unload. That is, the unregister() method only affects subsequent navigations.

    unregister() method must run these steps:

    1. Let p be a promise. @@ -2048,7 +2047,7 @@

      The user agent must create a ServiceWorkerContainer object when a Navigator object or a WorkerNavigator object is created and associate it with that object.

      A ServiceWorkerContainer provides capabilities to register, unregister, and update the service worker registrations, and provides access to the state of the service worker registrations and their associated service workers.

      -

      A ServiceWorkerContainer has an associated service worker client, which is a service worker client whose global object is associated with the Navigator object or the WorkerNavigator object that the ServiceWorkerContainer is retrieved from.

      +

      A ServiceWorkerContainer has an associated service worker client, which is a service worker client whose global object is associated with the Navigator object or the WorkerNavigator object that the ServiceWorkerContainer is retrieved from.

      A ServiceWorkerContainer object has an associated ready promise (a promise). It is initially set to a new promise.

      A ServiceWorkerContainer object has a task source called the client message queue, initially empty. A client message queue can be enabled or disabled, and is initially disabled. When a ServiceWorkerContainer object’s client message queue is enabled, the event loop must use it as one of its task sources. When the ServiceWorkerContainer object’s relevant global object is a Window object, all tasks queued on its client message queue must be associated with its relevant settings object’s responsible document.

      @@ -2255,7 +2254,7 @@

      controllerchange Event - The service worker client’s active service worker changes. (See step 9.2 of the Activate algorithm. The skip waiting flag of a service worker causes activation of the service worker registration to occur while service worker clients are using the service worker registration, navigator.serviceWorker.controller immediately reflects the active worker as the service worker that controls the service worker client.) + The service worker client’s active service worker changes. (See step 9.2 of the Activate algorithm. The skip waiting flag of a service worker causes activation of the service worker registration to occur while service worker clients are using the service worker registration, navigator.serviceWorker.controller immediately reflects the active worker as the service worker that controls the service worker client.) message ServiceWorkerMessageEvent @@ -2322,7 +2321,7 @@

      A ServiceWorkerGlobalScope object represents the global execution context of a service worker. A ServiceWorkerGlobalScope object has an associated service worker (a service worker).

      -

      ServiceWorkerGlobalScope object provides generic, event-driven, time-limited script execution contexts that run at an origin. Once successfully registered, a service worker is started, kept alive and killed by their relationship to events, not service worker clients. Any type of synchronous requests must not be initiated inside of a service worker.

      +

      ServiceWorkerGlobalScope object provides generic, event-driven, time-limited script execution contexts that run at an origin. Once successfully registered, a service worker is started, kept alive and killed by their relationship to events, not service worker clients. Any type of synchronous requests must not be initiated inside of a service worker.

      4.1.1. clients

      clients attribute must return the Clients object that is associated with the context object.

      @@ -2383,7 +2382,6 @@

      4.2
      [Exposed=ServiceWorker]
       interface Client {
         readonly attribute USVString url;
      -  readonly attribute FrameType frameType;
         readonly attribute DOMString id;
         readonly attribute boolean reserved;
         void postMessage(any message, optional sequence<object> transfer = []);
      @@ -2393,59 +2391,34 @@ 

      4.2 interface WindowClient : Client { readonly attribute VisibilityState visibilityState; readonly attribute boolean focused; + [SameObject] readonly attribute FrozenArray<USVString> ancestorOrigins; [NewObject] Promise<WindowClient> focus(); [NewObject] Promise<WindowClient> navigate(USVString url); }; - -enum FrameType { - "auxiliary", - "top-level", - "nested", - "none" -};

      -

      A Client object has an associated service worker client (a service worker client).

      +

      A Client object has an associated service worker client (a service worker client).

      A WindowClient object has an associated visibility state, which is one of visibilityState attribute value.

      A WindowClient object has an associated focus state, which is either true or false (initially false).

      +

      A WindowClient object has an associated ancestor origins array.

      4.2.1. url

      The url attribute must return the context object’s associated service worker client’s serialized creation URL.

      -

      4.2.2. frameType

      -

      The frameType attribute must return the value (in FrameType enumeration) corresponding to the first matching statement, switching on service worker client’s frame type:

      -
      -
      auxiliary -
      - "auxiliary" -

      The window client’s global object’s browsing context is an auxiliary browsing context.

      -
      top-level -
      - "top-level" -

      The window client’s global object’s browsing context is a top-level browsing context.

      -
      nested -
      - "nested" -

      The window client’s global object’s browsing context is a nested browsing context.

      -
      none -
      "none" -
      -
      -
      -

      4.2.3. id

      -

      The id attribute must return its associated service worker client’s id.

      +

      4.2.2. id

      +

      The id attribute must return its associated service worker client’s id.

      -

      4.2.4. reserved

      -

      The reserved attribute must return true if the context object’s associated service worker client’s execution ready flag is unset, and false otherwise.

      +

      4.2.3. reserved

      +

      The reserved attribute must return true if the context object’s associated service worker client’s execution ready flag is unset, and false otherwise.

      Defining the execution ready flag is a work in progress. See the pull request to HTML.

      -

      4.2.5. postMessage(message, transfer)

      +

      4.2.4. postMessage(message, transfer)

      The postMessage(message, transfer) method must run these steps:

      1. Let sourceSettings be the context object’s relevant settings object. -
      2. Let destination be the ServiceWorkerContainer object whose service worker client is the context object’s service worker client. +
      3. Let destination be the ServiceWorkerContainer object whose service worker client is the context object’s service worker client.
      4. If destination is null, throw an "InvalidStateError" exception.
      5. Let targetRealm be destination’s relevant Realm.
      6. Let cloneRecord be StructuredCloneWithTransfer(message, transfer, targetRealm). If this throws an exception, rethrow that exception and abort these steps. @@ -2464,13 +2437,17 @@

      -

      4.2.6. visibilityState

      +

      4.2.5. visibilityState

      The visibilityState attribute must return the context object’s visibility state.

      -

      4.2.7. focused

      +

      4.2.6. focused

      The focused attribute must return the context object’s focus state.

      +
      +

      4.2.7. ancestorOrigins

      +

      The ancestorOrigins attribute must return the context object’s associated service worker client’s ancestor origins array.

      +

      4.2.8. focus()

      The focus() method must run these steps:

      @@ -2482,16 +2459,18 @@

      context object’s associated service worker client’s global object’s browsing context.
    2. Let visibilityState be null. -
    3. Let focusState be null. +
    4. Let focusState be false. +
    5. Let ancestorOrigins be the empty array.
    6. Queue a task task to run the following substeps on the context object’s associated service worker client’s responsible event loop using the user interaction task source:
      1. Run the focusing steps with browsingContext.
      2. Set visibilityState to browsingContext’s active document’s visibilityState attribute value.
      3. Set focusState to the result of running the has focus steps with browsingContext’s active document as the argument. +
      4. Set ancestorOrigins to browsingContext’s active document’s relevant global object’s Location object’s ancestor origins array.
    7. Wait for task to have executed. -
    8. Let windowClient be the result of running Create Window Client algorithm with the context object’s associated service worker client, visibilityState and focusState as the arguments. +
    9. Let windowClient be the result of running Create Window Client algorithm with the context object’s associated service worker client, visibilityState, focusState, and ancestorOrigins as the arguments.
    10. If windowClient’s focus state is true, resolve promise with windowClient.
    11. Else, reject promise with a TypeError.
    @@ -2514,7 +2493,8 @@

    If browsingContext has discarded its Document, reject promise with a TypeError and abort these steps.
  • Let navigateFailed to false.
  • Let visibilityState be null. -
  • Let focusState be null. +
  • Let focusState be false. +
  • Let ancestorOrigins be the empty array.
  • Queue a task task to run the following substeps on the context object’s associated service worker client’s responsible event loop using the user interaction task source:
      @@ -2522,6 +2502,7 @@

      If the algorithm steps invoked in the step labeled HandleNavigate throws an exception, set navigateFailed to true.
    1. Set visibilityState to browsingContext’s active document’s visibilityState attribute value.
    2. Set focusState to the result of running the has focus steps with browsingContext’s active document as the argument. +
    3. Set ancestorOrigins to browsingContext’s active document’s relevant global object’s Location object’s ancestor origins array.
  • Wait for task to have executed (including its asynchronous steps).
  • If navigateFailed is true, reject promise with a TypeError and abort these steps. @@ -2531,7 +2512,7 @@

    Resolve promise with null.
  • Abort these steps. -
  • Let windowClient be the result of running Create Window Client algorithm with browsingContext’s Window object’s environment settings object, visibilityState and focusState as the arguments. +
  • Let windowClient be the result of running Create Window Client algorithm with browsingContext’s Window object’s environment settings object, visibilityState, focusState, and ancestorOrigins as the arguments.
  • Resolve promise with windowClient.
  • Return promise. @@ -2545,7 +2526,7 @@

    4. // The objects returned will be new instances every time [NewObject] Promise<any> get(DOMString id); [NewObject] Promise<sequence<Client>> matchAll(optional ClientQueryOptions options); - [NewObject] Promise<WindowClient?> openWindow(USVString url); + [NewObject] Promise<WindowClient?> openWindow(USVString url); [NewObject] Promise<void> claim(); }; @@ -2572,7 +2553,7 @@

    in parallel:
    1. - For each service worker client client whose origin is the same as the associated service worker’s origin: + For each service worker client client whose origin is the same as the associated service worker’s origin:
      1. If client’s id is not id, continue to the next iteration of the loop.
      2. @@ -2586,11 +2567,12 @@

        secure context, reject promise with a "SecurityError" exception and abort these steps.

    2. - If client is a type of environment or is a window client, then: + If client is a type of environment or is a window client, then:
      1. Let browsingContext be null.
      2. Let visibilityState be null. -
      3. Let focusState be null. +
      4. Let focusState be false. +
      5. Let ancestorOrigins be the empty array.
      6. If client is a type of environment, set browsingContext to client’s target browsing context.
      7. Else, set browsingContext to client’s global object’s browsing context.
      8. @@ -2598,9 +2580,10 @@

        active document’s visibilityState attribute value.
      9. Set focusState to the result of running the has focus steps with browsingContext’s active document as the argument. +
      10. If client is a window client, set ancestorOrigins to browsingContext’s active document’s relevant global object’s Location object’s ancestor origins array.
    3. Wait for task to have executed. -
    4. Let windowClient be the result of running Create Window Client algorithm with client, visibilityState and focusState as the arguments. +
    5. Let windowClient be the result of running Create Window Client algorithm with client, visibilityState, focusState, and ancestorOrigins as the arguments.
    6. Resolve promise with windowClient and abort these steps.
  • @@ -2625,7 +2608,7 @@

    service worker client client whose origin is the same as the associated service worker’s origin: + For each service worker client client whose origin is the same as the associated service worker’s origin:
    1. If client is a type of environment, then: @@ -2651,15 +2634,16 @@

      service worker client client in targetClients, in the most recently focused order for window clients: + For each service worker client client in targetClients, in the most recently focused order for window clients:
      1. - If options.type is "window" or "all", and client is a type of environment or is a window client, then: + If options.type is "window" or "all", and client is a type of environment or is a window client, then:
        1. Let browsingContext be null.
        2. Let isClientEnumerable be true.
        3. Let visibilityState be the empty string.
        4. Let focusState be false. +
        5. Let ancestorOrigins be the empty array.
        6. If client is a type of environment, set browsingContext to client’s target browsing context.
        7. Else, set browsingContext to client’s global object’s browsing context.
        8. @@ -2669,6 +2653,7 @@

          responsible document is not browsingContext’s active document, set isClientEnumerable to false and abort these steps.
        9. Set visibilityState to browsingContext’s active document’s visibilityState attribute value.
        10. Set focusState to the result of running the has focus steps with browsingContext’s active document as the argument. +
        11. It client is a window client, set ancestorOrigins to browsingContext’s active document’s relevant global object’s Location object’s ancestor origins array.
      2. Wait for task to have executed. @@ -2676,7 +2661,7 @@

        Create Window Client algorithm with client, visibilityState and focusState as the arguments. +
      3. Let windowClient be the result of running Create Window Client algorithm with client, visibilityState, focusState, and ancestorOrigins as the arguments.
      4. Add windowClient to matchedClients.

    @@ -2707,7 +2692,8 @@

    Let newContext be a new top-level browsing context.
  • Let openWindowFailed to false.
  • Let visibilityState be null. -
  • Let focusState be null. +
  • Let focusState be false. +
  • Let ancestorOrigins be the empty array.
  • Queue a task task to run the following substeps on newContext’s Window object’s environment settings object’s responsible event loop using the user interaction task source:
      @@ -2715,6 +2701,7 @@

      If the algorithm steps invoked in the step labeled HandleNavigate throws an exception, set openWindowFailed to true.
    1. Set visibilityState to newContext’s active document’s visibilityState attribute value.
    2. Set focusState to the result of running the has focus steps with newContext’s active document as the argument. +
    3. Set ancestorOrigins to newContext’s active document’s relevant global object’s Location object’s ancestor origins array.
  • Wait for task to have executed (including its asynchronous steps).
  • If openWindowFailed is true, reject promise with a TypeError and abort these steps. @@ -2724,7 +2711,7 @@

    Resolve promise with null.
  • Abort these steps. -
  • Let client be the result of running Create Window Client algorithm with newContext’s Window object’s environment settings object, visibilityState and focusState as the arguments. +
  • Let client be the result of running Create Window Client algorithm with newContext’s Window object’s environment settings object, visibilityState, focusState, and ancestorOrigins as the arguments.
  • Resolve promise with client.
  • Return promise. @@ -2740,7 +2727,7 @@

    in parallel:
    1. - For each service worker client client whose origin is the same as the service worker’s origin: + For each service worker client client whose origin is the same as the service worker’s origin:
      1. If client is a type of environment, then: @@ -3176,7 +3163,7 @@

        4.8.2. event.origin

        -

        The origin attribute must return the value it was initialized to. When the object is created, this attribute must be initialized to the empty string. It represents the origin of the service worker client that sent the message.

        +

        The origin attribute must return the value it was initialized to. When the object is created, this attribute must be initialized to the empty string. It represents the origin of the service worker client that sent the message.

        4.8.3. event.lastEventId

        @@ -3858,7 +3845,7 @@

        7. Security Considerations

        7.1. Secure Context

        -

        Service workers must execute in secure contexts. Service worker clients must also be secure contexts to register a service worker registration, to get access to the service worker registrations and the service workers, to do messaging with the service workers, and to be manipulated by the service workers. This effectively means that service workers and their service worker clients should be hosted over HTTPS. A user agent may allow localhost, 127.0.0.0/8, and ::1/128 for development purpose. (Note that they may still be secure contexts.) The primary reason for this restriction is to protect users from the risks associated with insecure contexts.

        +

        Service workers must execute in secure contexts. Service worker clients must also be secure contexts to register a service worker registration, to get access to the service worker registrations and the service workers, to do messaging with the service workers, and to be manipulated by the service workers. This effectively means that service workers and their service worker clients should be hosted over HTTPS. A user agent may allow localhost, 127.0.0.0/8, and ::1/128 for development purpose. (Note that they may still be secure contexts.) The primary reason for this restriction is to protect users from the risks associated with insecure contexts.

        7.2. Content Security Policy

        @@ -3875,7 +3862,7 @@

        7.3.1. Origin restriction

        This section is non-normative.

        -

        A Service worker executes in the registering service worker client’s origin. One of the advanced concerns that major applications would encounter is whether they can be hosted from a CDN. By definition, these are servers in other places, often on other origins. Therefore, service workers cannot be hosted on CDNs. But they can include resources via importScripts(). The reason for this restriction is that service workers create the opportunity for a bad actor to turn a bad day into a bad eternity.

        +

        A Service worker executes in the registering service worker client’s origin. One of the advanced concerns that major applications would encounter is whether they can be hosted from a CDN. By definition, these are servers in other places, often on other origins. Therefore, service workers cannot be hosted on CDNs. But they can include resources via importScripts(). The reason for this restriction is that service workers create the opportunity for a bad actor to turn a bad day into a bad eternity.

        7.3.2. importScripts(urls)

        @@ -3975,7 +3962,7 @@

        Appendix A: Al

        A job has a scope url (a URL).

        A job has a script url (a URL).

        A job has a worker type ("classic" or "module").

        -

        A job has a client (a service worker client). It is initially null.

        +

        A job has a client (a service worker client). It is initially null.

        A job has a referrer (a URL or null).

        A job has a promise (a promise). It is initially null.

        A job has a list of equivalent jobs (a list of jobs). It is initially the empty list.

        @@ -3995,7 +3982,7 @@

        Crea
        scopeURL, a URL
        scriptURL, a URL
        promise, a promise -
        client, a service worker client +
        client, a service worker client
        Output
        job, a job @@ -4112,7 +4099,7 @@

        scopeURL, a URL or failure or null
        scriptURL, a URL or failure
        promise, a promise -
        client, a service worker client +
        client, a service worker client
        referrer, a URL
        workerType, a worker type
        Output @@ -4346,7 +4333,7 @@

        In
      2. Run the Update Worker State algorithm passing registration’s installing worker and installing as the arguments.
      3. Assert: job’s promise is not null.
      4. Invoke Resolve Job Promise with job and the ServiceWorkerRegistration object which represents registration. -
      5. Queue a task to fire an event named updatefound at all the ServiceWorkerRegistration objects for all the service worker clients whose creation URL matches registration’s scope url and all the service workers whose containing service worker registration is registration. +
      6. Queue a task to fire an event named updatefound at all the ServiceWorkerRegistration objects for all the service worker clients whose creation URL matches registration’s scope url and all the service workers whose containing service worker registration is registration.
      7. Let installingWorker be registration’s installing worker.
      8. Invoke Run Service Worker algorithm with installingWorker as the argument.
      9. @@ -4393,7 +4380,7 @@

        In

    2. Invoke Finish Job with job.
    3. Wait for all the tasks queued by Update Worker State invoked in this algorithm have executed. -
    4. Wait until no service worker client is using registration or registration’s waiting worker’s skip waiting flag is set. +
    5. Wait until no service worker client is using registration or registration’s waiting worker’s skip waiting flag is set.
    6. If registration’s waiting worker waitingWorker is not null and waitingWorker’s skip waiting flag is not set, invoke Activate algorithm with registration as its argument.

  • @@ -4422,14 +4409,14 @@

    Acti

    Once an active worker is activating, neither a runtime script error nor a force termination of the active worker prevents the active worker from getting activated.

  • If redundantWorker is not null, run the Update Worker State algorithm passing redundantWorker and redundant as the arguments.
  • - For each service worker client client whose creation URL matches registration’s scope url: + For each service worker client client whose creation URL matches registration’s scope url:
      -
    1. If client is a window client, unassociate client’s responsible document from its application cache, if it has one. +
    2. If client is a window client, unassociate client’s responsible document from its application cache, if it has one.
    3. Else if client is a shared worker client, unassociate client’s global object from its application cache, if it has one.

    Resources will now use the service worker registration instead of the existing application cache.

  • - For each service worker client client who is using registration: + For each service worker client client who is using registration:
    1. Set client’s active worker to registration’s active worker.
    2. Invoke Notify Controller Change algorithm with client as the argument. @@ -4484,7 +4471,7 @@

      API base URL
      Return serviceWorker’s script url.
      The origin -
      Return its registering service worker client’s origin. +
      Return its registering service worker client’s origin.
      The creation URL
      Return workerGlobalScope’s url.
      The HTTPS state @@ -4574,7 +4561,7 @@

      active worker is null, return null.
    3. If request’s destination is not "report", set reservedClient’s active service worker to registration’s active worker.
    -

    From this point, the service worker client starts to use its active service worker’s containing service worker registration.

    +

    From this point, the service worker client starts to use its active service worker’s containing service worker registration.

  • Else if request is a subresource request, then:
      @@ -4595,7 +4582,7 @@

      clientId attribute to client’s id.
    1. If request is a non-subresource request and request’s destination is not "report", initialize e’s reservedClientId attribute to reservedClient’s id, and to the empty string otherwise.
    2. If request is a navigation request, initialize e’s targetClientId attribute to request’s target client id, and to the empty string otherwise. -
    3. Let the isReload attribute of e be initialized to true if request’s client is a window client and the event was dispatched with the user’s intention for the page reload, and false otherwise. +
    4. Let the isReload attribute of e be initialized to true if request’s client is a window client and the event was dispatched with the user’s intention for the page reload, and false otherwise.
    5. Dispatch e at activeWorker’s environment settings object’s global object.
    6. If e’s respond-with entered flag is set, set respondWithEntered to true.
    7. @@ -4755,10 +4742,10 @@

      Handle Service Worker Client Unload

      -

      The user agent must run these steps when a service worker client unloads by unloading, being killed, or terminating.

      +

      The user agent must run these steps when a service worker client unloads by unloading, being killed, or terminating.

      Input -
      client, a service worker client +
      client, a service worker client
      Output
      None
      @@ -4766,7 +4753,7 @@

      service worker registration used by client.
    8. If registration is null, abort these steps. -
    9. If any other service worker client is using registration, abort these steps. +
    10. If any other service worker client is using registration, abort these steps.
    11. If registration’s uninstalling flag is set, invoke Clear Registration algorithm passing registration as its argument and abort these steps.
    12. If registration’s waiting worker is not null, run Activate algorithm with registration as the argument.
    @@ -4823,7 +4810,7 @@

    Unre
  • Set registration’s uninstalling flag.
  • Invoke Resolve Job Promise with job and true.
  • - If no service worker client is using registration, invoke Clear Registration algorithm passing registration as its argument. + If no service worker client is using registration, invoke Clear Registration algorithm passing registration as its argument.

    When the registration is being used for a client, the deletion of the registration is handled by the Handle Service Worker Client Unload algorithm.

  • Invoke Finish Job with job. @@ -4982,7 +4969,7 @@

    Up

    Notify Controller Change

    Input -
    client, a service worker client +
    client, a service worker client
    Output
    None
    @@ -5080,7 +5067,7 @@

    Create Client

    Input -
    client, a service worker client +
    client, a service worker client
    Output
    clientObject, a Client object
    @@ -5094,17 +5081,19 @@

    C

    Create Window Client

    Input -
    client, a service worker client +
    client, a service worker client
    visibilityState, a string
    focusState, a boolean +
    ancestorOrigins, an array
    Output -
    windowClient, a WindowClient object +
    windowClient, a WindowClient object
      -
    1. Let windowClient be a new WindowClient object. +
    2. Let windowClient be a new WindowClient object.
    3. Set windowClient’s service worker client to client.
    4. Set windowClient’s visibility state to visibilityState.
    5. Set windowClient’s focus state to focusState. +
    6. Set windowClient’s ancestor origins array to ancestorOrigins.
    7. Return windowClient.
    @@ -5390,8 +5379,8 @@

    add(request), in §6.4.3
  • all, in §4.3
  • "all", in §4.3 -
  • "auxiliary", in §4.2 -
  • auxiliary, in §4.2 +
  • ancestorOrigins, in §4.2.7 +
  • ancestor origins array, in §4.2
  • Cache, in §6.4
  • CacheBatchOperation, in §6.4
  • cacheName, in §6.4 @@ -5445,7 +5434,7 @@

    FetchEvent(type, eventInitDict), in §4.6
  • fetching record, in §6.1
  • focus(), in §4.2.8 -
  • focused, in §4.2.7 +
  • focused, in §4.2.6
  • focus state, in §4.2
  • force bypass cache flag, in §Unnumbered section
  • foreignfetch, in §4.9 @@ -5454,9 +5443,6 @@

    ForeignFetchEvent(type, eventInitDict), in §4.7
  • ForeignFetchOptions, in §4.5
  • ForeignFetchResponse, in §4.7 -
  • FrameType, in §4.2.2 -
  • frame type, in §2.3 -
  • frameType, in §4.2.2
  • functional events, in §2.1
  • get(id), in §4.3.1
  • getRegistration(), in §3.4.4 @@ -5475,7 +5461,7 @@

    dfn for service worker, in §2.1 -
  • attribute for Client, in §4.2.3 +
  • attribute for Client, in §4.2.2
  • ignoreMethod, in §6.4
  • ignoreSearch, in §6.4 @@ -5561,10 +5547,6 @@

    name to cache map, in §6.1
  • navigate(url), in §4.2.9 -
  • "nested", in §4.2 -
  • nested, in §4.2 -
  • "none", in §4.2 -
  • none, in §4.2
  • onactivate, in §4.1.4
  • oncontrollerchange, in §3.4.7
  • onfetch, in §4.1.4 @@ -5603,12 +5585,12 @@

    dict-member for ExtendableMessageEventInit, in §4.8
  • attribute for ExtendableMessageEvent, in §4.8.5 -
  • postMessage(message), in §4.2.5 +
  • postMessage(message), in §4.2.4
  • postMessage(message, transfer)
  • potential response @@ -5640,7 +5622,7 @@

    dict-member for CacheBatchOperation, in §6.4
  • request to response map, in §6.1 -
  • reserved, in §4.2.4 +
  • reserved, in §4.2.3
  • reservedClientId
      @@ -5759,8 +5741,6 @@

      attribute for FetchEvent, in §4.6.4

  • task queues, in §2.2 -
  • top-level, in §4.2 -
  • "top-level", in §4.2
  • type - - @@ -7057,7 +7024,7 @@

    3.4.4. getRegistration(clientURL)
  • 3.4.5. getRegistrations()
  • 3.6. Events -
  • 4.2.5. postMessage(message, transfer) +
  • 4.2.4. postMessage(message, transfer)
  • 5.1. Processing
  • Notify Controller Change @@ -7074,7 +7041,7 @@

    3.4. ServiceWorkerContainer (2) (3)
  • 3.4.6. startMessages()
  • 3.4.7. Event handlers -
  • 4.2.5. postMessage(message, transfer) +
  • 4.2.4. postMessage(message, transfer) + - - +
  • -
  • Let windowClient be the result of running Create Window Client algorithm with browsingContext's {{Window}} object's environment settings object, visibilityState and focusState as the arguments.
  • +
  • Let windowClient be the result of running Create Window Client algorithm with browsingContext's {{Window}} object's environment settings object, visibilityState, focusState, and ancestorOrigins as the arguments.
  • Resolve promise with windowClient.
  • @@ -1283,17 +1264,19 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
    1. Let browsingContext be null.
    2. Let visibilityState be null.
    3. -
    4. Let focusState be null.
    5. +
    6. Let focusState be false.
    7. +
    8. Let ancestorOrigins be the empty array.
    9. If client is a type of environment, set browsingContext to client’s target browsing context.
    10. Else, set browsingContext to client's global object's browsing context.
    11. Queue a task task to run the following substeps on browsingContext's event loop using the user interaction task source:
      1. Set visibilityState to browsingContext's active document's {{Document/visibilityState}} attribute value.
      2. Set focusState to the result of running the has focus steps with browsingContext's active document as the argument.
      3. +
      4. If client is a window client, set ancestorOrigins to browsingContext's active document's relevant global object's {{Location}} object's ancestor origins array.
    12. Wait for task to have executed.
    13. -
    14. Let windowClient be the result of running Create Window Client algorithm with client, visibilityState and focusState as the arguments.
    15. +
    16. Let windowClient be the result of running Create Window Client algorithm with client, visibilityState, focusState, and ancestorOrigins as the arguments.
    17. Resolve promise with windowClient and abort these steps.

  • @@ -1356,6 +1339,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
  • Let isClientEnumerable be true.
  • Let visibilityState be the empty string.
  • Let focusState be false.
  • +
  • Let ancestorOrigins be the empty array.
  • If client is a type of environment, set browsingContext to client’s target browsing context.
  • Else, set browsingContext to client's global object's browsing context.
  • Queue a task task to run the following substeps on browsingContext's event loop using the user interaction task source: @@ -1364,6 +1348,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
  • If client is a window client and client's responsible document is not browsingContext's active document, set isClientEnumerable to false and abort these steps.
  • Set visibilityState to browsingContext's active document's {{Document/visibilityState}} attribute value.
  • Set focusState to the result of running the has focus steps with browsingContext's active document as the argument.
  • +
  • It client is a window client, set ancestorOrigins to browsingContext's active document's relevant global object's {{Location}} object's ancestor origins array.
  • Wait for task to have executed. @@ -1371,7 +1356,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
  • If isClientEnumerable is true, then:
      -
    1. Let windowClient be the result of running Create Window Client algorithm with client, visibilityState and focusState as the arguments.
    2. +
    3. Let windowClient be the result of running Create Window Client algorithm with client, visibilityState, focusState, and ancestorOrigins as the arguments.
    4. Add windowClient to matchedClients.
  • @@ -1408,13 +1393,15 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
  • Let newContext be a new top-level browsing context.
  • Let openWindowFailed to false.
  • Let visibilityState be null.
  • -
  • Let focusState be null.
  • +
  • Let focusState be false.
  • +
  • Let ancestorOrigins be the empty array.
  • Queue a task task to run the following substeps on newContext's {{Window}} object's environment settings object's responsible event loop using the user interaction task source:
    1. HandleNavigate: Navigate newContext to url with exceptions enabled and replacement enabled.
    2. If the algorithm steps invoked in the step labeled HandleNavigate throws an exception, set openWindowFailed to true.
    3. Set visibilityState to newContext's active document's {{Document/visibilityState}} attribute value.
    4. Set focusState to the result of running the has focus steps with newContext's active document as the argument.
    5. +
    6. Set ancestorOrigins to newContext's active document's relevant global object's {{Location}} object's ancestor origins array.
  • Wait for task to have executed (including its asynchronous steps).
  • @@ -1425,7 +1412,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
  • Abort these steps.
  • -
  • Let client be the result of running Create Window Client algorithm with newContext's {{Window}} object's environment settings object, visibilityState and focusState as the arguments.
  • +
  • Let client be the result of running Create Window Client algorithm with newContext's {{Window}} object's environment settings object, visibilityState, focusState, and ancestorOrigins as the arguments.
  • Resolve promise with client.
  • @@ -3643,6 +3630,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
    client, a service worker client
    visibilityState, a string
    focusState, a boolean
    +
    ancestorOrigins, an array
    Output
    windowClient, a {{WindowClient}} object
    @@ -3651,6 +3639,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
  • Set windowClient's service worker client to client.
  • Set windowClient's visibility state to visibilityState.
  • Set windowClient's focus state to focusState.
  • +
  • Set windowClient's ancestor origins array to ancestorOrigins.
  • Return windowClient.
  • diff --git a/docs/v1/index.html b/docs/v1/index.html index ebc0b902..318373dd 100644 --- a/docs/v1/index.html +++ b/docs/v1/index.html @@ -1551,12 +1551,12 @@

    Table of Contents

    4.2 Client
    1. 4.2.1 url -
    2. 4.2.2 frameType -
    3. 4.2.3 id -
    4. 4.2.4 reserved -
    5. 4.2.5 postMessage(message, transfer) -
    6. 4.2.6 visibilityState -
    7. 4.2.7 focused +
    8. 4.2.2 id +
    9. 4.2.3 reserved +
    10. 4.2.4 postMessage(message, transfer) +
    11. 4.2.5 visibilityState +
    12. 4.2.6 focused +
    13. 4.2.7 ancestorOrigins
    14. 4.2.8 focus()
    15. 4.2.9 navigate(url)
    @@ -1769,19 +1769,18 @@

    2.3. Service Worker Client

    A service worker client is a type of environment or environment settings object.

    -

    A service worker client has an associated frame type, which is one of auxiliary, top-level, nested, and none. Unless stated otherwise it is none.

    -

    A service worker client has an algorithm defined as the origin that returns the service worker client’s creation URL’s origin if the service worker client is a type of environment, and the service worker client’s origin otherwise.

    -

    A window client is a service worker client whose global object is a Window object.

    -

    A dedicated worker client is a service worker client whose global object is a DedicatedWorkerGlobalScope object.

    -

    A shared worker client is a service worker client whose global object is a SharedWorkerGlobalScope object.

    +

    A service worker client has an algorithm defined as the origin that returns the service worker client’s creation URL’s origin if the service worker client is a type of environment, and the service worker client’s origin otherwise.

    +

    A window client is a service worker client whose global object is a Window object.

    +

    A dedicated worker client is a service worker client whose global object is a DedicatedWorkerGlobalScope object.

    +

    A shared worker client is a service worker client whose global object is a SharedWorkerGlobalScope object.

    A worker client is either a dedicated worker client or a shared worker client.

    2.4. Selection and Use

    -

    A service worker client independently selects and uses a service worker registration for its own loading and its subresources. The selection of a service worker registration, upon a non-subresource request, is a process of either matching a service worker registration from scope to registration map or inheriting an existing service worker registration from its parent or owner context depending on the request’s url.

    -

    When the request’s url is not local, a service worker client matches a service worker registration from scope to registration map. That is, the service worker client attempts to consult a service worker registration whose scope url matches its creation URL.

    -

    When the request’s url is local, if the service worker client’s responsible browsing context is a nested browsing context or the service worker client is a worker client, the service worker client inherits the service worker registration from its parent browsing context’s environment or one of the worker’s Documents' environment, respectively, if it exists.

    -

    If the selection was successful, the selected service worker registration’s active worker starts to control the service worker client. Otherwise, the flow returns to fetch where it falls back to the default behavior. When a service worker client is controlled by an active worker, it is considered that the service worker client is using the active worker’s containing service worker registration.

    +

    A service worker client independently selects and uses a service worker registration for its own loading and its subresources. The selection of a service worker registration, upon a non-subresource request, is a process of either matching a service worker registration from scope to registration map or inheriting an existing service worker registration from its parent or owner context depending on the request’s url.

    +

    When the request’s url is not local, a service worker client matches a service worker registration from scope to registration map. That is, the service worker client attempts to consult a service worker registration whose scope url matches its creation URL.

    +

    When the request’s url is local, if the service worker client’s responsible browsing context is a nested browsing context or the service worker client is a worker client, the service worker client inherits the service worker registration from its parent browsing context’s environment or one of the worker’s Documents' environment, respectively, if it exists.

    +

    If the selection was successful, the selected service worker registration’s active worker starts to control the service worker client. Otherwise, the flow returns to fetch where it falls back to the default behavior. When a service worker client is controlled by an active worker, it is considered that the service worker client is using the active worker’s containing service worker registration.

    2.5. Task Sources

    @@ -1961,7 +1960,7 @@

    -

    The unregister() method unregisters the service worker registration. It is important to note that the currently controlled service worker client’s active service worker’s containing service worker registration is effective until all the service worker clients (including itself) using this service worker registration unload. That is, the unregister() method only affects subsequent navigations.

    +

    The unregister() method unregisters the service worker registration. It is important to note that the currently controlled service worker client’s active service worker’s containing service worker registration is effective until all the service worker clients (including itself) using this service worker registration unload. That is, the unregister() method only affects subsequent navigations.

    unregister() method must run these steps:

    1. Let p be a promise. @@ -2024,7 +2023,7 @@

      The user agent must create a ServiceWorkerContainer object when a Navigator object or a WorkerNavigator object is created and associate it with that object.

      A ServiceWorkerContainer provides capabilities to register, unregister, and update the service worker registrations, and provides access to the state of the service worker registrations and their associated service workers.

      -

      A ServiceWorkerContainer has an associated service worker client, which is a service worker client whose global object is associated with the Navigator object or the WorkerNavigator object that the ServiceWorkerContainer is retrieved from.

      +

      A ServiceWorkerContainer has an associated service worker client, which is a service worker client whose global object is associated with the Navigator object or the WorkerNavigator object that the ServiceWorkerContainer is retrieved from.

      A ServiceWorkerContainer object has an associated ready promise (a promise). It is initially set to a new promise.

      A ServiceWorkerContainer object has a task source called the client message queue, initially empty. A client message queue can be enabled or disabled, and is initially disabled. When a ServiceWorkerContainer object’s client message queue is enabled, the event loop must use it as one of its task sources. When the ServiceWorkerContainer object’s relevant global object is a Window object, all tasks queued on its client message queue must be associated with its relevant settings object’s responsible document.

      @@ -2241,7 +2240,7 @@

      controllerchange Event - The service worker client’s active service worker changes. (See step 9.2 of the Activate algorithm. The skip waiting flag of a service worker causes activation of the service worker registration to occur while service worker clients are using the service worker registration, navigator.serviceWorker.controller immediately reflects the active worker as the service worker that controls the service worker client.) + The service worker client’s active service worker changes. (See step 9.2 of the Activate algorithm. The skip waiting flag of a service worker causes activation of the service worker registration to occur while service worker clients are using the service worker registration, navigator.serviceWorker.controller immediately reflects the active worker as the service worker that controls the service worker client.) message ServiceWorkerMessageEvent @@ -2307,7 +2306,7 @@

      A ServiceWorkerGlobalScope object represents the global execution context of a service worker. A ServiceWorkerGlobalScope object has an associated service worker (a service worker).

      -

      ServiceWorkerGlobalScope object provides generic, event-driven, time-limited script execution contexts that run at an origin. Once successfully registered, a service worker is started, kept alive and killed by their relationship to events, not service worker clients. Any type of synchronous requests must not be initiated inside of a service worker.

      +

      ServiceWorkerGlobalScope object provides generic, event-driven, time-limited script execution contexts that run at an origin. Once successfully registered, a service worker is started, kept alive and killed by their relationship to events, not service worker clients. Any type of synchronous requests must not be initiated inside of a service worker.

      4.1.1. clients

      clients attribute must return the Clients object that is associated with the context object.

      @@ -2365,7 +2364,6 @@

      4.2
      [Exposed=ServiceWorker]
       interface Client {
         readonly attribute USVString url;
      -  readonly attribute FrameType frameType;
         readonly attribute DOMString id;
         readonly attribute boolean reserved;
         void postMessage(any message, optional sequence<object> transfer);
      @@ -2375,59 +2373,34 @@ 

      4.2 interface WindowClient : Client { readonly attribute VisibilityState visibilityState; readonly attribute boolean focused; + [SameObject] readonly attribute FrozenArray<USVString> ancestorOrigins; [NewObject] Promise<WindowClient> focus(); [NewObject] Promise<WindowClient> navigate(USVString url); }; - -enum FrameType { - "auxiliary", - "top-level", - "nested", - "none" -};

      -

      A Client object has an associated service worker client (a service worker client).

      +

      A Client object has an associated service worker client (a service worker client).

      A WindowClient object has an associated visibility state, which is one of visibilityState attribute value.

      A WindowClient object has an associated focus state, which is either true or false (initially false).

      +

      A WindowClient object has an associated ancestor origins array.

      4.2.1. url

      The url attribute must return the context object’s associated service worker client’s serialized creation URL.

      -

      4.2.2. frameType

      -

      The frameType attribute must return the value (in FrameType enumeration) corresponding to the first matching statement, switching on service worker client’s frame type:

      -
      -
      auxiliary -
      - "auxiliary" -

      The window client’s global object’s browsing context is an auxiliary browsing context.

      -
      top-level -
      - "top-level" -

      The window client’s global object’s browsing context is a top-level browsing context.

      -
      nested -
      - "nested" -

      The window client’s global object’s browsing context is a nested browsing context.

      -
      none -
      "none" -
      +

      4.2.2. id

      +

      The id attribute must return its associated service worker client’s id.

      -

      4.2.3. id

      -

      The id attribute must return its associated service worker client’s id.

      -
      -
      -

      4.2.4. reserved

      -

      The reserved attribute must return true if the context object’s associated service worker client’s execution ready flag is unset, and false otherwise.

      +

      4.2.3. reserved

      +

      The reserved attribute must return true if the context object’s associated service worker client’s execution ready flag is unset, and false otherwise.

      Defining the execution ready flag is a work in progress. See the pull request to HTML.

      -

      4.2.5. postMessage(message, transfer)

      +

      4.2.4. postMessage(message, transfer)

      The postMessage(message, transfer) method must run these steps:

      1. Let sourceSettings be the context object’s relevant settings object. -
      2. Let destination be the ServiceWorkerContainer object whose service worker client is the context object’s service worker client. +
      3. Let destination be the ServiceWorkerContainer object whose service worker client is the context object’s service worker client.
      4. If destination is null, throw an "InvalidStateError" exception.
      5. Let targetRealm be destination’s relevant Realm.
      6. Let cloneRecord be StructuredCloneWithTransfer(message, transfer, targetRealm). If this throws an exception, rethrow that exception and abort these steps. @@ -2446,13 +2419,17 @@

      -

      4.2.6. visibilityState

      +

      4.2.5. visibilityState

      The visibilityState attribute must return the context object’s visibility state.

      -

      4.2.7. focused

      +

      4.2.6. focused

      The focused attribute must return the context object’s focus state.

      +
      +

      4.2.7. ancestorOrigins

      +

      The ancestorOrigins attribute must return the context object’s associated service worker client’s ancestor origins array.

      +

      4.2.8. focus()

      The focus() method must run these steps:

      @@ -2464,16 +2441,18 @@

      context object’s associated service worker client’s global object’s browsing context.
    2. Let visibilityState be null. -
    3. Let focusState be null. +
    4. Let focusState be false. +
    5. Let ancestorOrigins be the empty array.
    6. Queue a task task to run the following substeps on the context object’s associated service worker client’s responsible event loop using the user interaction task source:
      1. Run the focusing steps with browsingContext.
      2. Set visibilityState to browsingContext’s active document’s visibilityState attribute value.
      3. Set focusState to the result of running the has focus steps with browsingContext’s active document as the argument. +
      4. Set ancestorOrigins to browsingContext’s active document’s relevant global object’s Location object’s ancestor origins array.
    7. Wait for task to have executed. -
    8. Let windowClient be the result of running Create Window Client algorithm with the context object’s associated service worker client, visibilityState and focusState as the arguments. +
    9. Let windowClient be the result of running Create Window Client algorithm with the context object’s associated service worker client, visibilityState, focusState, and ancestorOrigins as the arguments.
    10. If windowClient’s focus state is true, resolve promise with windowClient.
    11. Else, reject promise with a TypeError.
    @@ -2496,7 +2475,8 @@

    If browsingContext has discarded its Document, reject promise with a TypeError and abort these steps.
  • Let navigateFailed to false.
  • Let visibilityState be null. -
  • Let focusState be null. +
  • Let focusState be false. +
  • Let ancestorOrigins be the empty array.
  • Queue a task task to run the following substeps on the context object’s associated service worker client’s responsible event loop using the user interaction task source:
      @@ -2504,6 +2484,7 @@

      If the algorithm steps invoked in the step labeled HandleNavigate throws an exception, set navigateFailed to true.
    1. Set visibilityState to browsingContext’s active document’s visibilityState attribute value.
    2. Set focusState to the result of running the has focus steps with browsingContext’s active document as the argument. +
    3. Set ancestorOrigins to browsingContext’s active document’s relevant global object’s Location object’s ancestor origins array.
  • Wait for task to have executed (including its asynchronous steps).
  • If navigateFailed is true, reject promise with a TypeError and abort these steps. @@ -2513,7 +2494,7 @@

    Resolve promise with null.
  • Abort these steps. -
  • Let windowClient be the result of running Create Window Client algorithm with browsingContext’s Window object’s environment settings object, visibilityState and focusState as the arguments. +
  • Let windowClient be the result of running Create Window Client algorithm with browsingContext’s Window object’s environment settings object, visibilityState, focusState, and ancestorOrigins as the arguments.
  • Resolve promise with windowClient.
  • Return promise. @@ -2527,7 +2508,7 @@

    4. // The objects returned will be new instances every time [NewObject] Promise<any> get(DOMString id); [NewObject] Promise<sequence<Client>> matchAll(optional ClientQueryOptions options); - [NewObject] Promise<WindowClient?> openWindow(USVString url); + [NewObject] Promise<WindowClient?> openWindow(USVString url); [NewObject] Promise<void> claim(); }; @@ -2554,7 +2535,7 @@

    in parallel:
    1. - For each service worker client client whose origin is the same as the associated service worker’s origin: + For each service worker client client whose origin is the same as the associated service worker’s origin:
      1. If client’s id is not id, continue to the next iteration of the loop.
      2. @@ -2568,11 +2549,12 @@

        secure context, reject promise with a "SecurityError" exception and abort these steps.

    2. - If client is a type of environment or is a window client, then: + If client is a type of environment or is a window client, then:
      1. Let browsingContext be null.
      2. Let visibilityState be null. -
      3. Let focusState be null. +
      4. Let focusState be false. +
      5. Let ancestorOrigins be the empty array.
      6. If client is a type of environment, set browsingContext to client’s target browsing context.
      7. Else, set browsingContext to client’s global object’s browsing context.
      8. @@ -2580,9 +2562,10 @@

        active document’s visibilityState attribute value.
      9. Set focusState to the result of running the has focus steps with browsingContext’s active document as the argument. +
      10. If client is a window client, set ancestorOrigins to browsingContext’s active document’s relevant global object’s Location object’s ancestor origins array.
    3. Wait for task to have executed. -
    4. Let windowClient be the result of running Create Window Client algorithm with client, visibilityState and focusState as the arguments. +
    5. Let windowClient be the result of running Create Window Client algorithm with client, visibilityState, focusState, and ancestorOrigins as the arguments.
    6. Resolve promise with windowClient and abort these steps.
  • @@ -2607,7 +2590,7 @@

    service worker client client whose origin is the same as the associated service worker’s origin: + For each service worker client client whose origin is the same as the associated service worker’s origin:
    1. If client is a type of environment, then: @@ -2633,15 +2616,16 @@

      service worker client client in targetClients, in the most recently focused order for window clients: + For each service worker client client in targetClients, in the most recently focused order for window clients:
      1. - If options.type is "window" or "all", and client is a type of environment or is a window client, then: + If options.type is "window" or "all", and client is a type of environment or is a window client, then:
        1. Let browsingContext be null.
        2. Let isClientEnumerable be true.
        3. Let visibilityState be the empty string.
        4. Let focusState be false. +
        5. Let ancestorOrigins be the empty array.
        6. If client is a type of environment, set browsingContext to client’s target browsing context.
        7. Else, set browsingContext to client’s global object’s browsing context.
        8. @@ -2651,6 +2635,7 @@

          responsible document is not browsingContext’s active document, set isClientEnumerable to false and abort these steps.
        9. Set visibilityState to browsingContext’s active document’s visibilityState attribute value.
        10. Set focusState to the result of running the has focus steps with browsingContext’s active document as the argument. +
        11. It client is a window client, set ancestorOrigins to browsingContext’s active document’s relevant global object’s Location object’s ancestor origins array.
      2. Wait for task to have executed. @@ -2658,7 +2643,7 @@

        Create Window Client algorithm with client, visibilityState and focusState as the arguments. +
      3. Let windowClient be the result of running Create Window Client algorithm with client, visibilityState, focusState, and ancestorOrigins as the arguments.
      4. Add windowClient to matchedClients.

    @@ -2689,7 +2674,8 @@

    Let newContext be a new top-level browsing context.
  • Let openWindowFailed to false.
  • Let visibilityState be null. -
  • Let focusState be null. +
  • Let focusState be false. +
  • Let ancestorOrigins be the empty array.
  • Queue a task task to run the following substeps on newContext’s Window object’s environment settings object’s responsible event loop using the user interaction task source:
      @@ -2697,6 +2683,7 @@

      If the algorithm steps invoked in the step labeled HandleNavigate throws an exception, set openWindowFailed to true.
    1. Set visibilityState to newContext’s active document’s visibilityState attribute value.
    2. Set focusState to the result of running the has focus steps with newContext’s active document as the argument. +
    3. Set ancestorOrigins to newContext’s active document’s relevant global object’s Location object’s ancestor origins array.
  • Wait for task to have executed (including its asynchronous steps).
  • If openWindowFailed is true, reject promise with a TypeError and abort these steps. @@ -2706,7 +2693,7 @@

    Resolve promise with null.
  • Abort these steps. -
  • Let client be the result of running Create Window Client algorithm with newContext’s Window object’s environment settings object, visibilityState and focusState as the arguments. +
  • Let client be the result of running Create Window Client algorithm with newContext’s Window object’s environment settings object, visibilityState, focusState, and ancestorOrigins as the arguments.
  • Resolve promise with client.
  • Return promise. @@ -2722,7 +2709,7 @@

    in parallel:
    1. - For each service worker client client whose origin is the same as the service worker’s origin: + For each service worker client client whose origin is the same as the service worker’s origin:
      1. If client is a type of environment, then: @@ -2973,7 +2960,7 @@

        4.6.2. event.origin

        -

        The origin attribute must return the value it was initialized to. When the object is created, this attribute must be initialized to the empty string. It represents the origin of the service worker client that sent the message.

        +

        The origin attribute must return the value it was initialized to. When the object is created, this attribute must be initialized to the empty string. It represents the origin of the service worker client that sent the message.

        4.6.3. event.lastEventId

        @@ -3588,7 +3575,7 @@

        6. Security Considerations

        6.1. Secure Context

        -

        Service workers must execute in secure contexts. Service worker clients must also be secure contexts to register a service worker registration, to get access to the service worker registrations and the service workers, to do messaging with the service workers, and to be manipulated by the service workers. This effectively means that service workers and their service worker clients should be hosted over HTTPS. A user agent may allow localhost, 127.0.0.0/8, and ::1/128 for development purpose. (Note that they may still be secure contexts.) The primary reason for this restriction is to protect users from the risks associated with insecure contexts.

        +

        Service workers must execute in secure contexts. Service worker clients must also be secure contexts to register a service worker registration, to get access to the service worker registrations and the service workers, to do messaging with the service workers, and to be manipulated by the service workers. This effectively means that service workers and their service worker clients should be hosted over HTTPS. A user agent may allow localhost, 127.0.0.0/8, and ::1/128 for development purpose. (Note that they may still be secure contexts.) The primary reason for this restriction is to protect users from the risks associated with insecure contexts.

        6.2. Content Security Policy

        @@ -3605,7 +3592,7 @@

        6.3.1. Origin restriction

        This section is non-normative.

        -

        A Service worker executes in the registering service worker client’s origin. One of the advanced concerns that major applications would encounter is whether they can be hosted from a CDN. By definition, these are servers in other places, often on other origins. Therefore, service workers cannot be hosted on CDNs. But they can include resources via importScripts(). The reason for this restriction is that service workers create the opportunity for a bad actor to turn a bad day into a bad eternity.

        +

        A Service worker executes in the registering service worker client’s origin. One of the advanced concerns that major applications would encounter is whether they can be hosted from a CDN. By definition, these are servers in other places, often on other origins. Therefore, service workers cannot be hosted on CDNs. But they can include resources via importScripts(). The reason for this restriction is that service workers create the opportunity for a bad actor to turn a bad day into a bad eternity.

        6.3.2. importScripts(urls)

        @@ -3705,7 +3692,7 @@

        Appendix A: Al

        A job has a scope url (a URL).

        A job has a script url (a URL).

        A job has a worker type ("classic" or "module").

        -

        A job has a client (a service worker client). It is initially null.

        +

        A job has a client (a service worker client). It is initially null.

        A job has a promise (a promise). It is initially null.

        A job has a list of equivalent jobs (a list of jobs). It is initially the empty list.

        A job has a force bypass cache flag It is initially unset.

        @@ -3724,7 +3711,7 @@

        Crea
        scopeURL, a URL
        scriptURL, a URL
        promise, a promise -
        client, a service worker client +
        client, a service worker client
        Output
        job, a job @@ -4045,7 +4032,7 @@

        In
      2. Run the Update Worker State algorithm passing registration’s installing worker and installing as the arguments.
      3. Assert: job’s promise is not null.
      4. Invoke Resolve Job Promise with job and the ServiceWorkerRegistration object which represents registration. -
      5. Queue a task to fire an event named updatefound at all the ServiceWorkerRegistration objects for all the service worker clients whose creation URL matches registration’s scope url and all the service workers whose containing service worker registration is registration. +
      6. Queue a task to fire an event named updatefound at all the ServiceWorkerRegistration objects for all the service worker clients whose creation URL matches registration’s scope url and all the service workers whose containing service worker registration is registration.
      7. Let installingWorker be registration’s installing worker.
      8. Invoke Run Service Worker algorithm with installingWorker as the argument.
      9. @@ -4092,7 +4079,7 @@

        In

    2. Invoke Finish Job with job.
    3. Wait for all the tasks queued by Update Worker State invoked in this algorithm have executed. -
    4. Wait until no service worker client is using registration or registration’s waiting worker’s skip waiting flag is set. +
    5. Wait until no service worker client is using registration or registration’s waiting worker’s skip waiting flag is set.
    6. If registration’s waiting worker waitingWorker is not null and waitingWorker’s skip waiting flag is not set, invoke Activate algorithm with registration as its argument.

  • @@ -4121,14 +4108,14 @@

    Acti

    Once an active worker is activating, neither a runtime script error nor a force termination of the active worker prevents the active worker from getting activated.

  • If redundantWorker is not null, run the Update Worker State algorithm passing redundantWorker and redundant as the arguments.
  • - For each service worker client client whose creation URL matches registration’s scope url: + For each service worker client client whose creation URL matches registration’s scope url:
      -
    1. If client is a window client, unassociate client’s responsible document from its application cache, if it has one. +
    2. If client is a window client, unassociate client’s responsible document from its application cache, if it has one.
    3. Else if client is a shared worker client, unassociate client’s global object from its application cache, if it has one.

    Resources will now use the service worker registration instead of the existing application cache.

  • - For each service worker client client who is using registration: + For each service worker client client who is using registration:
    1. Set client’s active worker to registration’s active worker.
    2. Invoke Notify Controller Change algorithm with client as the argument. @@ -4183,7 +4170,7 @@

      API base URL
      Return serviceWorker’s script url.
      The origin -
      Return its registering service worker client’s origin. +
      Return its registering service worker client’s origin.
      The creation URL
      Return workerGlobalScope’s url.
      The HTTPS state @@ -4273,7 +4260,7 @@

      active worker is null, return null.
    3. If request’s destination is not "report", set reservedClient’s active service worker to registration’s active worker.
    -

    From this point, the service worker client starts to use its active service worker’s containing service worker registration.

    +

    From this point, the service worker client starts to use its active service worker’s containing service worker registration.

  • Else if request is a subresource request, then:
      @@ -4294,7 +4281,7 @@

      clientId attribute to client’s id.
    1. If request is a non-subresource request and request’s destination is not "report", initialize e’s reservedClientId attribute to reservedClient’s id, and to the empty string otherwise.
    2. If request is a navigation request, initialize e’s targetClientId attribute to request’s target client id, and to the empty string otherwise. -
    3. Let the isReload attribute of e be initialized to true if request’s client is a window client and the event was dispatched with the user’s intention for the page reload, and false otherwise. +
    4. Let the isReload attribute of e be initialized to true if request’s client is a window client and the event was dispatched with the user’s intention for the page reload, and false otherwise.
    5. Dispatch e at activeWorker’s environment settings object’s global object.
    6. If e’s respond-with entered flag is set, set respondWithEntered to true.
    7. @@ -4358,10 +4345,10 @@

      Handle Service Worker Client Unload

      -

      The user agent must run these steps when a service worker client unloads by unloading, being killed, or terminating.

      +

      The user agent must run these steps when a service worker client unloads by unloading, being killed, or terminating.

      Input -
      client, a service worker client +
      client, a service worker client
      Output
      None
      @@ -4369,7 +4356,7 @@

      service worker registration used by client.
    8. If registration is null, abort these steps. -
    9. If any other service worker client is using registration, abort these steps. +
    10. If any other service worker client is using registration, abort these steps.
    11. If registration’s uninstalling flag is set, invoke Clear Registration algorithm passing registration as its argument and abort these steps.
    12. If registration’s waiting worker is not null, run Activate algorithm with registration as the argument.
    @@ -4426,7 +4413,7 @@

    Unre
  • Set registration’s uninstalling flag.
  • Invoke Resolve Job Promise with job and true.
  • - If no service worker client is using registration, invoke Clear Registration algorithm passing registration as its argument. + If no service worker client is using registration, invoke Clear Registration algorithm passing registration as its argument.

    When the registration is being used for a client, the deletion of the registration is handled by the Handle Service Worker Client Unload algorithm.

  • Invoke Finish Job with job. @@ -4585,7 +4572,7 @@

    Up

    Notify Controller Change

    Input -
    client, a service worker client +
    client, a service worker client
    Output
    None
    @@ -4659,7 +4646,7 @@

    Create Client

    Input -
    client, a service worker client +
    client, a service worker client
    Output
    clientObject, a Client object
    @@ -4673,17 +4660,19 @@

    C

    Create Window Client

    Input -
    client, a service worker client +
    client, a service worker client
    visibilityState, a string
    focusState, a boolean +
    ancestorOrigins, an array
    Output -
    windowClient, a WindowClient object +
    windowClient, a WindowClient object
      -
    1. Let windowClient be a new WindowClient object. +
    2. Let windowClient be a new WindowClient object.
    3. Set windowClient’s service worker client to client.
    4. Set windowClient’s visibility state to visibilityState.
    5. Set windowClient’s focus state to focusState. +
    6. Set windowClient’s ancestor origins array to ancestorOrigins.
    7. Return windowClient.
    @@ -4969,8 +4958,8 @@

    add(request), in §5.4.3
  • all, in §4.3
  • "all", in §4.3 -
  • "auxiliary", in §4.2 -
  • auxiliary, in §4.2 +
  • ancestorOrigins, in §4.2.7 +
  • ancestor origins array, in §4.2
  • Cache, in §5.4
  • CacheBatchOperation, in §5.4
  • cacheName, in §5.4 @@ -5024,12 +5013,9 @@

    FetchEvent(type, eventInitDict), in §4.5
  • fetching record, in §5.1
  • focus(), in §4.2.8 -
  • focused, in §4.2.7 +
  • focused, in §4.2.6
  • focus state, in §4.2
  • force bypass cache flag, in §Unnumbered section -
  • FrameType, in §4.2.2 -
  • frame type, in §2.3 -
  • frameType, in §4.2.2
  • functional events, in §2.1
  • get(id), in §4.3.1
  • getRegistration(), in §3.4.4 @@ -5046,7 +5032,7 @@

    dfn for service worker, in §2.1 -
  • attribute for Client, in §4.2.3 +
  • attribute for Client, in §4.2.2
  • ignoreMethod, in §5.4
  • ignoreSearch, in §5.4 @@ -5126,10 +5112,6 @@

    name to cache map, in §5.1
  • navigate(url), in §4.2.9 -
  • "nested", in §4.2 -
  • nested, in §4.2 -
  • "none", in §4.2 -
  • none, in §4.2
  • onactivate, in §4.1.4
  • oncontrollerchange, in §3.4.7
  • onfetch, in §4.1.4 @@ -5162,12 +5144,12 @@

    dict-member for ExtendableMessageEventInit, in §4.6
  • attribute for ExtendableMessageEvent, in §4.6.5 -
  • postMessage(message), in §4.2.5 +
  • postMessage(message), in §4.2.4
  • postMessage(message, transfer)
  • potential response, in §4.5
  • processing equivalence, in §Unnumbered section @@ -5190,7 +5172,7 @@

    dict-member for CacheBatchOperation, in §5.4
  • request to response map, in §5.1 -
  • reserved, in §4.2.4 +
  • reserved, in §4.2.3
  • reservedClientId
      @@ -5284,8 +5266,6 @@

      attribute for FetchEvent, in §4.5.4

  • task queues, in §2.2 -
  • top-level, in §4.2 -
  • "top-level", in §4.2
  • type - - @@ -6485,7 +6452,7 @@

    3.4.4. getRegistration(clientURL)
  • 3.4.5. getRegistrations()
  • 3.6. Events -
  • 4.2.5. postMessage(message, transfer) +
  • 4.2.4. postMessage(message, transfer)
  • Notify Controller Change @@ -6501,7 +6468,7 @@

    3.4. ServiceWorkerContainer (2) (3)
  • 3.4.6. startMessages()
  • 3.4.7. Event handlers -
  • 4.2.5. postMessage(message, transfer) +
  • 4.2.4. postMessage(message, transfer) + - - +