Skip to content

Commit

Permalink
Add Client's reserved state
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jungkees committed Nov 9, 2016
1 parent 2e67d60 commit d2c327c
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 74 deletions.
5 changes: 4 additions & 1 deletion docs/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,8 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231

<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>

<p>A {{Client}} object has an associated <dfn for="Client">reserved state</dfn>, which is either true or false.</p>

<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>

<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>
Expand All @@ -1020,7 +1022,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
<section>
<h4 id="client-reserved">{{Client/reserved}}</h4>

<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>
<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>

<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>
</section>
Expand Down Expand Up @@ -4011,6 +4013,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
<ol>
<li>Let <var>clientObject</var> be a new {{Client}} object.</li>
<li>Set <var>clientObject</var>'s <a for="Client">service worker client</a> to <var>client</var>.</li>
<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>
<li>Return <var>clientObject</var>.</li>
</ol>
</section>
Expand Down
Loading

0 comments on commit d2c327c

Please sign in to comment.