Skip to content

Commit d2c327c

Browse files
committed
Add Client's reserved state
Once a Client object is created, the value client.reserved returns shouldn't change. This defines Client's reserved state which Create Client algorithm initializes when a Client object is created. Fixes #1003
1 parent 2e67d60 commit d2c327c

File tree

4 files changed

+98
-74
lines changed

4 files changed

+98
-74
lines changed

docs/index.bs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,8 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
999999

10001000
<p>A {{Client}} object has an associated <dfn for="Client">service worker client</dfn> (a <a href="#dfn-service-worker-client">service worker client</a>).</p>
10011001

1002+
<p>A {{Client}} object has an associated <dfn for="Client">reserved state</dfn>, which is either true or false.</p>
1003+
10021004
<p>A {{WindowClient}} object has an associated <dfn id="dfn-service-worker-client-visibilitystate">visibility state</dfn>, which is one of {{Document/visibilityState}} attribute value.</p>
10031005

10041006
<p>A {{WindowClient}} object has an associated <dfn id="dfn-service-worker-client-focusstate">focus state</dfn>, which is either true or false (initially false).</p>
@@ -1020,7 +1022,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
10201022
<section>
10211023
<h4 id="client-reserved">{{Client/reserved}}</h4>
10221024

1023-
<p>The <dfn attribute for="Client"><code>reserved</code></dfn> attribute <em class="rfc2119" title="MUST">must</em> return true if the <a>context object</a>'s associated <a for="Client">service worker client</a>'s <a for="environment">execution ready flag</a> is unset, and false otherwise.</p>
1025+
<p>The <dfn attribute for="Client"><code>reserved</code></dfn> attribute <em class="rfc2119" title="MUST">must</em> return the <a>context object</a>'s associated <a for="Client">reserved state</a>.</p>
10241026

10251027
<p class="issue">Defining the execution ready flag is a work in progress. See <a href="https://github.com/whatwg/html/pull/2004">the pull request to HTML</a>.</p>
10261028
</section>
@@ -4011,6 +4013,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
40114013
<ol>
40124014
<li>Let <var>clientObject</var> be a new {{Client}} object.</li>
40134015
<li>Set <var>clientObject</var>'s <a for="Client">service worker client</a> to <var>client</var>.</li>
4016+
<li>Set <var>clientObject</var>'s <a for="Client">reserved state</a> to true if <var>client</var>'s <a for="environment">execution ready flag</a> is unset, and false otherwise.</li>
40144017
<li>Return <var>clientObject</var>.</li>
40154018
</ol>
40164019
</section>

0 commit comments

Comments
 (0)