Skip to content

Commit 5939bae

Browse files
committed
Remove replacement enabled flag for WindowClient.navigate(url)
navigate(url) method shouldn't replace the history, so this patch makes it not set the replacement enabled flag. Fixes #918.
1 parent 60a33d5 commit 5939bae

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

docs/index.bs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ spec: webidl; urlPrefix: https://heycam.github.io/webidl/
413413
<dt>The <dfn id="dfn-handle-fetch-task-source">handle fetch task source</dfn></dt>
414414
<dd>This <a>task source</a> is used for <a>dispatching</a> <a href="#service-worker-global-scope-fetch-event">fetch</a> events to <a href="#dfn-service-worker">service workers</a>.</dd>
415415
<dt>The <dfn id="dfn-handle-functional-event-task-source">handle functional event task source</dfn></dt>
416-
<dd>This <a>task source</a> is used for features that <a>dispatch</a> other <a href="#dfn-functional-events">functional</a> events, e.g. <a href="https://w3c.github.io/push-api/#the-push-event">push</a> events, to <a href="#dfn-service-worker">service workers</a>.
416+
<dd>This <a>task source</a> is used for features that <a>dispatch</a> other <a href="#dfn-functional-events">functional</a> events, e.g. <a href="https://w3c.github.io/push-api/#h-the-push-event">push</a> events, to <a href="#dfn-service-worker">service workers</a>.
417417
<p class="note">A user agent may use a separate task source for each functional event type in order to avoid a head-of-line blocking phenomenon for certain functional events. For instance, a user agent may use a different task source for <a href="http://web-alarms.sysapps.org/#firing-task-event-to-service-worker">task</a> events from other task sources.</p>
418418
</dd>
419419
</dl>
@@ -1300,7 +1300,7 @@ spec: webidl; urlPrefix: https://heycam.github.io/webidl/
13001300
<li>Let <var>focusState</var> be null.</li>
13011301
<li><a>Queue a task</a> <var>task</var> to run the following substeps on the <a>context object</a>'s associated <a href="#dfn-service-worker-client-client">service worker client</a>'s <a>responsible event loop</a> using the <a>user interaction task source</a>:
13021302
<ol>
1303-
<li><em>HandleNavigate</em>: <a>Navigate</a> <var>browsingContext</var> to <var>url</var> with <a>replacement enabled</a> and <a lt="exceptions enabled flag">exceptions enabled</a>. The <a>source browsing context</a> must be <var>browsingContext</var>.</li>
1303+
<li><em>HandleNavigate</em>: <a>Navigate</a> <var>browsingContext</var> to <var>url</var> with <a lt="exceptions enabled flag">exceptions enabled</a>. The <a>source browsing context</a> must be <var>browsingContext</var>.</li>
13041304
<li>If the algorithm steps invoked in the step labeled <em>HandleNavigate</em> <a>throws</a> an exception, set <var>navigateFailed</var> to true.</li>
13051305
<li>Set <var>visibilityState</var> to <var>browsingContext</var>'s <a>active document</a>'s {{Document/visibilityState}} attribute value.</li>
13061306
<li>Set <var>focusState</var> to the result of running the <a>has focus steps</a> with <var>browsingContext</var>'s <a>active document</a> as the argument.</li>
@@ -1527,7 +1527,7 @@ spec: webidl; urlPrefix: https://heycam.github.io/webidl/
15271527
<li>Let <var>focusState</var> be null.</li>
15281528
<li><a>Queue a task</a> <var>task</var> to run the following substeps on <var>newContext</var>'s {{Window}} object's <a>environment settings object</a>'s <a>responsible event loop</a> using the <a>user interaction task source</a>:
15291529
<ol>
1530-
<li><em>HandleNavigate</em>: <a>Navigate</a> <var>newContext</var> to <var>url</var>, with <a lt="exceptions enabled flag">exceptions enabled</a> and <a>replacement enabled</a>.</li>
1530+
<li><em>HandleNavigate</em>: <a>Navigate</a> <var>newContext</var> to <var>url</var> with <a lt="exceptions enabled flag">exceptions enabled</a> and <a>replacement enabled</a>.</li>
15311531
<li>If the algorithm steps invoked in the step labeled <em>HandleNavigate</em> <a>throws</a> an exception, set <var>openWindowFailed</var> to true.</li>
15321532
<li>Set <var>visibilityState</var> to <var>newContext</var>'s <a>active document</a>'s {{Document/visibilityState}} attribute value.</li>
15331533
<li>Set <var>focusState</var> to the result of running the <a>has focus steps</a> with <var>newContext</var>'s <a>active document</a> as the argument.</li>

docs/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,7 @@
14221422
<div class="head">
14231423
<p data-fill-with="logo"><a class="logo" href="http://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72"> </a> </p>
14241424
<h1 class="p-name no-ref" id="title">Service Workers Nightly</h1>
1425-
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2016-09-29">29 September 2016</time></span></h2>
1425+
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2016-10-10">10 October 2016</time></span></h2>
14261426
<div data-fill-with="spec-metadata">
14271427
<dl>
14281428
<dt>This version:
@@ -1813,7 +1813,7 @@ <h3 class="heading settled" data-level="2.5" id="task-sources"><span class="secn
18131813
<dd>This <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#task-source">task source</a> is used for <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-dispatch">dispatching</a> <a href="#service-worker-global-scope-fetch-event" id="ref-for-service-worker-global-scope-fetch-event-2">fetch</a> events to <a href="#dfn-service-worker" id="ref-for-dfn-service-worker-36">service workers</a>.
18141814
<dt>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport="" id="dfn-handle-functional-event-task-source">handle functional event task source</dfn>
18151815
<dd>
1816-
This <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#task-source">task source</a> is used for features that <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-dispatch">dispatch</a> other <a href="#dfn-functional-events" id="ref-for-dfn-functional-events-1">functional</a> events, e.g. <a href="https://w3c.github.io/push-api/#the-push-event">push</a> events, to <a href="#dfn-service-worker" id="ref-for-dfn-service-worker-37">service workers</a>.
1816+
This <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#task-source">task source</a> is used for features that <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-event-dispatch">dispatch</a> other <a href="#dfn-functional-events" id="ref-for-dfn-functional-events-1">functional</a> events, e.g. <a href="https://w3c.github.io/push-api/#h-the-push-event">push</a> events, to <a href="#dfn-service-worker" id="ref-for-dfn-service-worker-37">service workers</a>.
18171817
<p class="note" role="note">A user agent may use a separate task source for each functional event type in order to avoid a head-of-line blocking phenomenon for certain functional events. For instance, a user agent may use a different task source for <a href="http://web-alarms.sysapps.org/#firing-task-event-to-service-worker">task</a> events from other task sources.</p>
18181818
</dl>
18191819
</section>
@@ -2510,7 +2510,7 @@ <h4 class="heading settled" data-level="4.2.8" id="client-navigate"><span class=
25102510
<li>
25112511
<a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task">Queue a task</a> <var>task</var> to run the following substeps on the <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#context-object">context object</a>’s associated <a href="#dfn-service-worker-client-client" id="ref-for-dfn-service-worker-client-client-10">service worker client</a>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#responsible-event-loop">responsible event loop</a> using the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#user-interaction-task-source">user interaction task source</a>:
25122512
<ol>
2513-
<li><em>HandleNavigate</em>: <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#navigate">Navigate</a> <var>browsingContext</var> to <var>url</var> with <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#replacement-enabled">replacement enabled</a> and <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#exceptions-enabled">exceptions enabled</a>. The <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#source-browsing-context">source browsing context</a> must be <var>browsingContext</var>.
2513+
<li><em>HandleNavigate</em>: <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#navigate">Navigate</a> <var>browsingContext</var> to <var>url</var> with <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#exceptions-enabled">exceptions enabled</a>. The <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#source-browsing-context">source browsing context</a> must be <var>browsingContext</var>.
25142514
<li>If the algorithm steps invoked in the step labeled <em>HandleNavigate</em> <a data-link-type="dfn" href="https://heycam.github.io/webidl/#dfn-throw">throws</a> an exception, set <var>navigateFailed</var> to true.
25152515
<li>Set <var>visibilityState</var> to <var>browsingContext</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#active-document">active document</a>’s <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/page-visibility/#dom-document-visibilitystate">visibilityState</a></code> attribute value.
25162516
<li>Set <var>focusState</var> to the result of running the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/interaction.html#has-focus-steps">has focus steps</a> with <var>browsingContext</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#active-document">active document</a> as the argument.
@@ -2723,7 +2723,7 @@ <h4 class="heading settled" data-level="4.3.3" id="clients-openwindow"><span cla
27232723
<li>
27242724
<a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#queue-a-task">Queue a task</a> <var>task</var> to run the following substeps on <var>newContext</var>’s <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/browsers.html#window">Window</a></code> object’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object">environment settings object</a>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#responsible-event-loop">responsible event loop</a> using the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#user-interaction-task-source">user interaction task source</a>:
27252725
<ol>
2726-
<li><em>HandleNavigate</em>: <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#navigate">Navigate</a> <var>newContext</var> to <var>url</var>, with <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#exceptions-enabled">exceptions enabled</a> and <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#replacement-enabled">replacement enabled</a>.
2726+
<li><em>HandleNavigate</em>: <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#navigate">Navigate</a> <var>newContext</var> to <var>url</var> with <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#exceptions-enabled">exceptions enabled</a> and <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#replacement-enabled">replacement enabled</a>.
27272727
<li>If the algorithm steps invoked in the step labeled <em>HandleNavigate</em> <a data-link-type="dfn" href="https://heycam.github.io/webidl/#dfn-throw">throws</a> an exception, set <var>openWindowFailed</var> to true.
27282728
<li>Set <var>visibilityState</var> to <var>newContext</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#active-document">active document</a>’s <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/page-visibility/#dom-document-visibilitystate">visibilityState</a></code> attribute value.
27292729
<li>Set <var>focusState</var> to the result of running the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/interaction.html#has-focus-steps">has focus steps</a> with <var>newContext</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#active-document">active document</a> as the argument.

docs/v1/index.bs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ spec: webidl; urlPrefix: https://heycam.github.io/webidl/
395395
<dt>The <dfn id="dfn-handle-fetch-task-source">handle fetch task source</dfn></dt>
396396
<dd>This <a>task source</a> is used for <a>dispatching</a> <a href="#service-worker-global-scope-fetch-event">fetch</a> events to <a href="#dfn-service-worker">service workers</a>.</dd>
397397
<dt>The <dfn id="dfn-handle-functional-event-task-source">handle functional event task source</dfn></dt>
398-
<dd>This <a>task source</a> is used for features that <a>dispatch</a> other <a href="#dfn-functional-events">functional</a> events, e.g. <a href="https://w3c.github.io/push-api/#the-push-event">push</a> events, to <a href="#dfn-service-worker">service workers</a>.
398+
<dd>This <a>task source</a> is used for features that <a>dispatch</a> other <a href="#dfn-functional-events">functional</a> events, e.g. <a href="https://w3c.github.io/push-api/#h-the-push-event">push</a> events, to <a href="#dfn-service-worker">service workers</a>.
399399
<p class="note">A user agent may use a separate task source for each functional event type in order to avoid a head-of-line blocking phenomenon for certain functional events. For instance, a user agent may use a different task source for <a href="http://web-alarms.sysapps.org/#firing-task-event-to-service-worker">task</a> events from other task sources.</p>
400400
</dd>
401401
</dl>
@@ -1287,7 +1287,7 @@ spec: webidl; urlPrefix: https://heycam.github.io/webidl/
12871287
<li>Let <var>focusState</var> be null.</li>
12881288
<li><a>Queue a task</a> <var>task</var> to run the following substeps on the <a>context object</a>'s associated <a href="#dfn-service-worker-client-client">service worker client</a>'s <a>responsible event loop</a> using the <a>user interaction task source</a>:
12891289
<ol>
1290-
<li><em>HandleNavigate</em>: <a>Navigate</a> <var>browsingContext</var> to <var>url</var> with <a>replacement enabled</a> and <a lt="exceptions enabled flag">exceptions enabled</a>. The <a>source browsing context</a> must be <var>browsingContext</var>.</li>
1290+
<li><em>HandleNavigate</em>: <a>Navigate</a> <var>browsingContext</var> to <var>url</var> with <a lt="exceptions enabled flag">exceptions enabled</a>. The <a>source browsing context</a> must be <var>browsingContext</var>.</li>
12911291
<li>If the algorithm steps invoked in the step labeled <em>HandleNavigate</em> <a>throws</a> an exception, set <var>navigateFailed</var> to true.</li>
12921292
<li>Set <var>visibilityState</var> to <var>browsingContext</var>'s <a>active document</a>'s {{Document/visibilityState}} attribute value.</li>
12931293
<li>Set <var>focusState</var> to the result of running the <a>has focus steps</a> with <var>browsingContext</var>'s <a>active document</a> as the argument.</li>
@@ -1514,7 +1514,7 @@ spec: webidl; urlPrefix: https://heycam.github.io/webidl/
15141514
<li>Let <var>focusState</var> be null.</li>
15151515
<li><a>Queue a task</a> <var>task</var> to run the following substeps on <var>newContext</var>'s {{Window}} object's <a>environment settings object</a>'s <a>responsible event loop</a> using the <a>user interaction task source</a>:
15161516
<ol>
1517-
<li><em>HandleNavigate</em>: <a>Navigate</a> <var>newContext</var> to <var>url</var>, with <a lt="exceptions enabled flag">exceptions enabled</a> and <a>replacement enabled</a>.</li>
1517+
<li><em>HandleNavigate</em>: <a>Navigate</a> <var>newContext</var> to <var>url</var> with <a lt="exceptions enabled flag">exceptions enabled</a> and <a>replacement enabled</a>.</li>
15181518
<li>If the algorithm steps invoked in the step labeled <em>HandleNavigate</em> <a>throws</a> an exception, set <var>openWindowFailed</var> to true.</li>
15191519
<li>Set <var>visibilityState</var> to <var>newContext</var>'s <a>active document</a>'s {{Document/visibilityState}} attribute value.</li>
15201520
<li>Set <var>focusState</var> to the result of running the <a>has focus steps</a> with <var>newContext</var>'s <a>active document</a> as the argument.</li>

0 commit comments

Comments
 (0)