diff --git a/docs/index.bs b/docs/index.bs
index 50e65e65..6c8f8c53 100644
--- a/docs/index.bs
+++ b/docs/index.bs
@@ -999,6 +999,8 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
A {{Client}} object has an associated service worker client (a service worker client ).
+ A {{Client}} object has an associated reserved state , which is either true or false.
+
A {{WindowClient}} object has an associated visibility state , which is one of {{Document/visibilityState}} attribute value.
A {{WindowClient}} object has an associated focus state , which is either true or false (initially false).
@@ -1020,7 +1022,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
@@ -4011,6 +4013,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
Let clientObject be a new {{Client}} object.
Set clientObject 's service worker client to client .
+ Set clientObject 's reserved state to true if client 's execution ready flag is unset, and false otherwise.
Return clientObject .
diff --git a/docs/index.html b/docs/index.html
index 862d2bb0..61ac96e0 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1422,7 +1422,7 @@
Service Workers Nightly
-
Editor’s Draft, 7 November 2016
+
Editor’s Draft, 9 November 2016
This version:
@@ -2397,6 +2397,7 @@
- Let clientObject be a new Client
object.
- Set clientObject ’s service worker client to client .
+ Let clientObject be a new Client
object.
+ Set clientObject ’s service worker client to client .
+ Set clientObject ’s reserved state to true if client ’s execution ready flag is unset, and false otherwise.
Return clientObject .
@@ -5097,7 +5099,7 @@
WindowClient object.
- Set windowClient ’s service worker client to client .
+ 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 .
@@ -5636,6 +5638,7 @@ dict-member for FetchEventInit, in §4.6
attribute for FetchEvent , in §4.6.3
+ reserved state , in §4.2
respond-with entered flag
+
+
diff --git a/docs/v1/index.bs b/docs/v1/index.bs
index 12b35ef1..54677b9f 100644
--- a/docs/v1/index.bs
+++ b/docs/v1/index.bs
@@ -994,6 +994,8 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
A {{Client}} object has an associated service worker client (a service worker client ).
+ A {{Client}} object has an associated reserved state , which is either true or false.
+
A WindowClient
object has an associated visibility state , which is one of {{Document/visibilityState}} attribute value.
A {{WindowClient}} object has an associated focus state , which is either true or false (initially false).
@@ -1015,7 +1017,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
@@ -3559,6 +3561,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
Let clientObject be a new {{Client}} object.
Set clientObject 's service worker client to client .
+ Set clientObject 's reserved state to true if client 's execution ready flag is unset, and false otherwise.
Return clientObject .
diff --git a/docs/v1/index.html b/docs/v1/index.html
index 9dd944c3..76ba598c 100644
--- a/docs/v1/index.html
+++ b/docs/v1/index.html
@@ -1422,7 +1422,7 @@
Service Workers 1
-
Editor’s Draft, 7 November 2016
+
Editor’s Draft, 9 November 2016
This version:
@@ -2379,6 +2379,7 @@ Client object has an associated service worker client (a service worker client ).
+ A Client
object has an associated reserved state , which is either true or false.
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 .
@@ -2392,7 +2393,7 @@ 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.
+ The reserved
attribute must return the context object ’s associated reserved state .
Defining the execution ready flag is a work in progress. See the pull request to HTML .
4.2.8. focus()
@@ -2439,12 +2440,12 @@ in parallel:
- Let browsingContext be the context object ’s associated service worker client ’s global object ’s browsing context .
+ Let browsingContext be the context object ’s associated service worker client ’s global object ’s browsing context .
Let visibilityState 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 :
+ 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 :
Run the focusing steps with browsingContext .
Set visibilityState to browsingContext ’s active document ’s visibilityState
attribute value.
@@ -2452,7 +2453,7 @@ active document’s relevant global object ’s Location
object’s ancestor origins array .
Wait for task to have executed.
- 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.
+ 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.
If windowClient ’s focus state is true, resolve promise with windowClient .
Else, reject promise with a TypeError
.
@@ -2466,19 +2467,19 @@ Let url be the result of parsing url with the context object ’s relevant settings object ’s API base URL .
If url is failure, return a promise rejected with a TypeError
.
If url is about:blank
, return a promise rejected with a TypeError
.
- If the context object ’s associated service worker client ’s active service worker is not the context object ’s relevant global object ’s service worker , return a promise rejected with a TypeError
.
+ If the context object ’s associated service worker client ’s active service worker is not the context object ’s relevant global object ’s service worker , return a promise rejected with a TypeError
.
Let promise be a new promise .
Run these substeps in parallel :
- Let browsingContext be the context object ’s associated service worker client ’s global object ’s browsing context .
+ Let browsingContext be the context object ’s associated service worker client ’s global object ’s browsing context .
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 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 :
+ 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 :
HandleNavigate : Navigate browsingContext to url with exceptions enabled . The source browsing context must be browsingContext .
If the algorithm steps invoked in the step labeled HandleNavigate throws an exception, set navigateFailed to true.
@@ -2507,7 +2508,7 @@ interface Clients {
// 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 <sequence <Client >> matchAll (optional ClientQueryOptions options );
[NewObject ] Promise <WindowClient ?> openWindow (USVString url );
[NewObject ] Promise <void > claim ();
};
@@ -2657,9 +2658,9 @@ WindowClient objects are always placed before Client
objects whose associated service worker clients are worker clients .
- WindowClient
objects that have been focused are placed first sorted in the most recently focused order, and WindowClient
objects that have never been focused are placed next sorted in their service worker clients ' creation order.
- Client
objects whose associated service worker clients are worker clients are placed next sorted in their service worker clients ' creation order.
+ WindowClient
objects are always placed before Client
objects whose associated service worker clients are worker clients .
+ WindowClient
objects that have been focused are placed first sorted in the most recently focused order, and WindowClient
objects that have never been focused are placed next sorted in their service worker clients ' creation order.
+ Client
objects whose associated service worker clients are worker clients are placed next sorted in their service worker clients ' creation order.
Resolve promise with matchedClients .
@@ -2948,7 +2949,7 @@ readonly attribute any data ;
readonly attribute USVString origin ;
readonly attribute DOMString lastEventId ;
- [SameObject ] readonly attribute (Client or ServiceWorker or MessagePort )? source ;
+ [SameObject ] readonly attribute (Client or ServiceWorker or MessagePort )? source ;
readonly attribute FrozenArray <MessagePort > ports ;
};
@@ -2956,7 +2957,7 @@ any data = null ;
USVString origin = "";
DOMString lastEventId = "";
- (Client or ServiceWorker or MessagePort )? source = null ;
+ (Client or ServiceWorker or MessagePort )? source = null ;
sequence <MessagePort > ports = [];
};
@@ -2975,7 +2976,7 @@ 4.6.4. event.source
- The source attribute must return the value it was initialized to. When the object is created, this attribute must be initialized to null. It represents the Client
object from which the message is sent.
+ The source attribute must return the value it was initialized to. When the object is created, this attribute must be initialized to null. It represents the Client
object from which the message is sent.
- Let clientObject be a new Client
object.
- Set clientObject ’s service worker client to client .
+ Let clientObject be a new Client
object.
+ Set clientObject ’s service worker client to client .
+ Set clientObject ’s reserved state to true if client ’s execution ready flag is unset, and false otherwise.
Return clientObject .
@@ -4676,7 +4678,7 @@
WindowClient object.
- Set windowClient ’s service worker client to client .
+ 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 .
@@ -5186,6 +5188,7 @@ dict-member for FetchEventInit, in §4.5
attribute for FetchEvent , in §4.5.3
+ reserved state , in §4.2
respond-with entered flag , in §4.5
respond-with error flag , in §4.5
respondWith(r) , in §4.5.6
@@ -5578,7 +5581,7 @@
Normative References
[CSP2]
- Mike West; Adam Barth; Daniel Veditz. Content Security Policy Level 2 . URL: https://w3c.github.io/webappsec/specs/CSP2/
+ Mike West; Adam Barth; Daniel Veditz. Content Security Policy Level 2 . URL: https://w3c.github.io/webappsec-csp/
[ECMASCRIPT]
ECMAScript Language Specification . URL: https://tc39.github.io/ecma262/
[FETCH]
@@ -6694,12 +6697,12 @@ #clientReferenced in:
+