Skip to content

Commit b8e715a

Browse files
committed
Add a guard to Notify Controller Change
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.
1 parent a279060 commit b8e715a

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

docs/index.bs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3973,7 +3973,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
39733973
</dl>
39743974
<ol>
39753975
<li><a>Assert</a>: <var>client</var> is not null.</li>
3976-
<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>
3976+
<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>
39773977
</ol>
39783978
<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>
39793979
</section>

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4983,7 +4983,7 @@ <h3 class="heading settled" id="notify-controller-change-algorithm"><span class=
49834983
</dl>
49844984
<ol>
49854985
<li><a data-link-type="dfn" href="http://tc39.github.io/ecma262/#sec-algorithm-conventions">Assert</a>: <var>client</var> is not null.
4986-
<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.
4986+
<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.
49874987
</ol>
49884988
<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>
49894989
</section>

docs/v1/index.bs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3540,7 +3540,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
35403540
</dl>
35413541
<ol>
35423542
<li><a>Assert</a>: <var>client</var> is not null.</li>
3543-
<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>
3543+
<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>
35443544
</ol>
35453545
<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>
35463546
</section>

docs/v1/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4586,7 +4586,7 @@ <h3 class="heading settled" id="notify-controller-change-algorithm"><span class=
45864586
</dl>
45874587
<ol>
45884588
<li><a data-link-type="dfn" href="http://tc39.github.io/ecma262/#sec-algorithm-conventions">Assert</a>: <var>client</var> is not null.
4589-
<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.
4589+
<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.
45904590
</ol>
45914591
<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>
45924592
</section>

0 commit comments

Comments
 (0)