Skip to content

Commit

Permalink
Add a guard to Notify Controller Change
Browse files Browse the repository at this point in the history
This change adds a guard to check the type of the given service worker
client, and run the step only for the environment settings object type
clients.
  • Loading branch information
jungkees committed Nov 3, 2016
1 parent a279060 commit b8e715a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3973,7 +3973,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
</dl>
<ol>
<li><a>Assert</a>: <var>client</var> is not null.</li>
<li><a>Queue a task</a> to <a>fire an event</a> named <code>controllerchange</code> at the <code><a href="#service-worker-container-interface">ServiceWorkerContainer</a></code> object <var>client</var> is <a href="#dfn-service-worker-container-interface-client">associated</a> with.</li>
<li>If <var>client</var> is a type of <a>environment settings object</a>, <a>queue a task</a> to <a>fire an event</a> named <code>controllerchange</code> at the <code><a href="#service-worker-container-interface">ServiceWorkerContainer</a></code> object <var>client</var> is <a href="#dfn-service-worker-container-interface-client">associated</a> with.</li>
</ol>
<p>The <a>task</a> <em class="rfc2119" title="MUST">must</em> use <var>client</var>'s <a>responsible event loop</a> and the <a>DOM manipulation task source</a>.</p>
</section>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4983,7 +4983,7 @@ <h3 class="heading settled" id="notify-controller-change-algorithm"><span class=
</dl>
<ol>
<li><a data-link-type="dfn" href="http://tc39.github.io/ecma262/#sec-algorithm-conventions">Assert</a>: <var>client</var> is not null.
<li><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task">Queue a task</a> to <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire">fire an event</a> named <code>controllerchange</code> at the <code><a href="#service-worker-container-interface" id="ref-for-service-worker-container-interface-16">ServiceWorkerContainer</a></code> object <var>client</var> is <a href="#dfn-service-worker-container-interface-client" id="ref-for-dfn-service-worker-container-interface-client-9">associated</a> with.
<li>If <var>client</var> is a type of <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object">environment settings object</a>, <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task">queue a task</a> to <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire">fire an event</a> named <code>controllerchange</code> at the <code><a href="#service-worker-container-interface" id="ref-for-service-worker-container-interface-16">ServiceWorkerContainer</a></code> object <var>client</var> is <a href="#dfn-service-worker-container-interface-client" id="ref-for-dfn-service-worker-container-interface-client-9">associated</a> with.
</ol>
<p>The <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-task">task</a> <em class="rfc2119" title="MUST">must</em> use <var>client</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#responsible-event-loop">responsible event loop</a> and the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#dom-manipulation-task-source">DOM manipulation task source</a>.</p>
</section>
Expand Down
2 changes: 1 addition & 1 deletion docs/v1/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3540,7 +3540,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
</dl>
<ol>
<li><a>Assert</a>: <var>client</var> is not null.</li>
<li><a>Queue a task</a> to <a>fire an event</a> named <code>controllerchange</code> at the <code><a href="#service-worker-container-interface">ServiceWorkerContainer</a></code> object <var>client</var> is <a href="#dfn-service-worker-container-interface-client">associated</a> with.</li>
<li>If <var>client</var> is a type of <a>environment settings object</a>, <a>queue a task</a> to <a>fire an event</a> named <code>controllerchange</code> at the <code><a href="#service-worker-container-interface">ServiceWorkerContainer</a></code> object <var>client</var> is <a href="#dfn-service-worker-container-interface-client">associated</a> with.</li>
</ol>
<p>The <a>task</a> <em class="rfc2119" title="MUST">must</em> use <var>client</var>'s <a>responsible event loop</a> and the <a>DOM manipulation task source</a>.</p>
</section>
Expand Down
2 changes: 1 addition & 1 deletion docs/v1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4586,7 +4586,7 @@ <h3 class="heading settled" id="notify-controller-change-algorithm"><span class=
</dl>
<ol>
<li><a data-link-type="dfn" href="http://tc39.github.io/ecma262/#sec-algorithm-conventions">Assert</a>: <var>client</var> is not null.
<li><a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task">Queue a task</a> to <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire">fire an event</a> named <code>controllerchange</code> at the <code><a href="#service-worker-container-interface" id="ref-for-service-worker-container-interface-16">ServiceWorkerContainer</a></code> object <var>client</var> is <a href="#dfn-service-worker-container-interface-client" id="ref-for-dfn-service-worker-container-interface-client-8">associated</a> with.
<li>If <var>client</var> is a type of <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object">environment settings object</a>, <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task">queue a task</a> to <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-fire">fire an event</a> named <code>controllerchange</code> at the <code><a href="#service-worker-container-interface" id="ref-for-service-worker-container-interface-16">ServiceWorkerContainer</a></code> object <var>client</var> is <a href="#dfn-service-worker-container-interface-client" id="ref-for-dfn-service-worker-container-interface-client-8">associated</a> with.
</ol>
<p>The <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-task">task</a> <em class="rfc2119" title="MUST">must</em> use <var>client</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#responsible-event-loop">responsible event loop</a> and the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#dom-manipulation-task-source">DOM manipulation task source</a>.</p>
</section>
Expand Down

0 comments on commit b8e715a

Please sign in to comment.