@@ -84575,6 +84575,15 @@ interface <dfn>Location</dfn> { // but see also <a href="#the-location-interface
84575
84575
</ol>
84576
84576
</li>
84577
84577
84578
+ <li><p>If <var>historyHandling</var> is "<code data-x="hh-default">default</code>",
84579
+ <var>resource</var> is a <span data-x="concept-request">request</span>, and either
84580
+ <var>resource</var>'s <span data-x="concept-request-url">url</span> <span
84581
+ data-x="concept-url-equals">equals</span> <var>browsingContext</var>'s <span>active
84582
+ document</span>'s <span data-x="concept-document-url">URL</span> or <var>resource</var>'s <span
84583
+ data-x="concept-request-url">url</span>'s <span data-x="concept-url-scheme">scheme</span> is
84584
+ "<code data-x="javascript protocol">javascript</code>"', then set <var>historyHandling</var> to
84585
+ "<code data-x="hh-replace">replace</code>".</li>
84586
+
84578
84587
<li><p>Let <var>activeDocumentNavigationOrigin</var> be the <span
84579
84588
data-x="concept-document-origin">origin</span> of the <span>active document</span> of
84580
84589
<var>browsingContext</var>.</p></li>
@@ -85557,9 +85566,14 @@ new PaymentRequest(…); // Allowed to use
85557
85566
following steps:</p>
85558
85567
85559
85568
<ol>
85569
+ <li><p>Let <var>sessionHistory</var> be <var>navigationParams</var>'s <span
85570
+ data-x="navigation-params-browsing-context">browsing context</span>'s <span>session
85571
+ history</span>.</p></li>
85572
+
85560
85573
<li>
85561
- <p><span data-x="unload a document">Unload</span> the <span
85562
- data-x="she-document">document</span> of the <span>current entry</span>.</p>
85574
+ <p><span data-x="unload a document">Unload</span> <var>sessionHistory</var>'s <span>current
85575
+ entry</span>'s <span
85576
+ data-x="she-document">document</span>.</p>
85563
85577
85564
85578
<p>If this instance of the <span data-x="navigate">navigation</span> algorithm is canceled while
85565
85579
this step is running the <span>unload a document</span> algorithm, then the <span>unload a
@@ -85570,28 +85584,29 @@ new PaymentRequest(…); // Allowed to use
85570
85584
</li>
85571
85585
85572
85586
<li>
85573
- <dl>
85574
- <dt>If <var>navigationParams</var>'s <span data-x="navigation-params-hh">history
85575
- handling</span> is "<code data-x="hh-entry-update">entry update</code>" or "<code
85576
- data-x="hh-reload">reload </code>"</dt>
85577
-
85587
+ <p>Switch on <var>navigationParams</var>'s <span data-x="navigation-params-hh">history
85588
+ handling</span>:</p>
85589
+ <dl class="switch">
85590
+ <dt>"<code data-x="hh-entry-update">entry update </code>"</dt>
85591
+ <dt>"<code data-x="hh-reload">reload</code>"</dt>
85578
85592
<dd>
85579
85593
<ol>
85580
- <li><p>Replace the <span data-x="she-document">document</span> of the <span>current
85581
- entry</span>, and of any other entries that reference the same <span
85582
- data-x="she-document">document</span> as that entry, with <var>newDocument</var>.</p></li>
85583
-
85584
- <li><p><span>Traverse the history</span> to the <span>current entry</span> with <var
85585
- data-x="traverse-history-hh">historyHandling</var> set to <var>navigationParams</var>'s <span
85586
- data-x="navigation-params-hh">history handling</span>.</p></li>
85594
+ <li><p>Let <var>oldDocument</var> be <var>sessionHistory</var>'s <span>current entry</span>'s
85595
+ <span data-x="she-document">document</span>.</p></li>
85596
+
85597
+ <li><p><span data-x="list iterate">For each</span> <var>entry</var> of
85598
+ <var>sessionHistory</var>: if <var>entry</var>'s <span data-x="she-document">document</span>
85599
+ is <var>oldDocument</var>, then set <var>entry</var>'s <span
85600
+ data-x="she-document">document</span> to <var>newDocument</var>.</p></li>
85601
+
85602
+ <li><p><span>Traverse the history</span> to <var>sessionHistory</var>'s <span>current
85603
+ entry</span> with <var data-x="traverse-history-hh">historyHandling</var> set to
85604
+ <var>navigationParams</var>'s <span data-x="navigation-params-hh">history
85605
+ handling</span>.</p></li>
85587
85606
</ol>
85588
85607
</dd>
85589
85608
85590
- <dt>Otherwise, if the navigation was initiated with a <span>URL</span> that <span
85591
- data-x="concept-url-equals">equals</span> <var>navigationParams</var>'s <span
85592
- data-x="navigation-params-browsing-context">browsing context</span>'s <span>active
85593
- document</span>'s <span data-x="concept-document-url">URL</span></dt>
85594
-
85609
+ <dt>"<code data-x="hh-replace">replace</code>"</dt>
85595
85610
<dd>
85596
85611
<ol>
85597
85612
<li>
@@ -85600,63 +85615,43 @@ new PaymentRequest(…); // Allowed to use
85600
85615
data-x="concept-document-url">URL</span> and <span data-x="she-document">document</span> is
85601
85616
<var>newDocument</var>.</p>
85602
85617
85603
- <p class="XXX">Some browsers copy over the serialized state of <span>current entry</span>,
85604
- but this is inconsistent. See <a href="https://github.com/whatwg/html/issues/6213">issue
85605
- #6213</a> for more discussion on this.</p>
85618
+ <p class="XXX">Some browsers copy over the serialized state <var>sessionHistory</var>'s
85619
+ <span>current entry</span> in cases where its <span data-x="she-URL">URL</span> <span
85620
+ data-x="concept-url-equals">equals</span> that of <var>newDocument</var>, but this is
85621
+ inconsistent. See <a href="https://github.com/whatwg/html/issues/6213">issue #6213</a> for
85622
+ more discussion on this.</p>
85606
85623
</li>
85607
85624
85608
- <li><p>Insert <var>newEntry</var> after the <span>current entry</span> in
85609
- <var>navigationParams</var>'s <span data-x="navigation-params-browsing-context">browsing
85610
- context</span>'s <span>session history</span>.</p></li>
85611
-
85612
- <li><p><span>Traverse the history</span> to <var>newEntry</var> with <var
85613
- data-x="traverse-history-hh">historyHandling</var> set to "<code
85614
- data-x="hh-replace">replace</code>".</p></li>
85615
- </ol>
85616
- </dd>
85617
-
85618
- <dt>Otherwise, if <var>navigationParams</var>'s <span data-x="navigation-params-hh">history
85619
- handling</span> is "<code data-x="hh-replace">replace</code>"</dt>
85620
-
85621
- <dd>
85622
- <ol>
85623
- <li><p>Let <var>newEntry</var> be a new <span>session history entry</span> whose <span
85624
- data-x="she-url">URL</span> is <var>newDocument</var>'s <span
85625
- data-x="concept-document-url">URL</span> and <span data-x="she-document">document</span> is
85626
- <var>newDocument</var>.</p></li>
85627
-
85628
- <li><p>Insert <var>newEntry</var> after the <span>current entry</span> in
85629
- <var>navigationParams</var>'s <span data-x="navigation-params-browsing-context">browsing
85630
- context</span>'s <span>session history</span>.</p></li>
85625
+ <li><p>Insert <var>newEntry</var> into <var>sessionHistory</var> after its <span>current
85626
+ entry</span>.</p></li>
85631
85627
85632
85628
<li><p><span>Traverse the history</span> to <var>newEntry</var> with
85633
85629
<var data-x="traverse-history-hh">historyHandling</var> set to "<code
85634
85630
data-x="hh-replace">replace</code>".</p></li>
85635
85631
</ol>
85636
85632
</dd>
85637
85633
85638
- <dt>Otherwise</dt>
85639
-
85634
+ <dt>"<code data-x="hh-default">default</code>"</dt>
85640
85635
<dd>
85641
85636
<ol>
85642
- <li><p>Assert: <var>navigationParams</var>'s <span data-x="navigation-params-hh">history
85643
- handling</span> is "<code data-x="hh-default">default</code>".</p></li>
85644
-
85645
85637
<li>
85646
- <p>Remove all the entries in the <span>session history</span > after the <span>current
85647
- entry</span>. If the <span>current entry</span> is the last entry in the session history,
85648
- then no entries are removed.</p>
85638
+ <p>Remove all the entries in <var>sessionHistory</var > after its <span>current entry</span>.
85639
+ ( If the <span>current entry</span> is the last entry in the session history, then no entries
85640
+ are removed.) </p>
85649
85641
85650
85642
<p class="note">This <a href="#history-notes">doesn't necessarily have to affect</a> the
85651
85643
user agent's user interface.</p>
85652
85644
</li>
85653
85645
85654
- <li><p>Append a new <span>session history entry</span> to the <span>session history</span>,
85655
- whose <span data-x="she-url">URL</span> is <var>newDocument</var>'s <span
85646
+ <li><p>Let <var>newEntry</var> be a new <span>session history entry</span> whose <span
85647
+ data-x="she-url">URL</span> is <var>newDocument</var>'s <span
85656
85648
data-x="concept-document-url">URL</span> and <span data-x="she-document">document</span> is
85657
85649
<var>newDocument</var>.</p></li>
85658
85650
85659
- <li><p><span>Traverse the history</span> to the new entry.</p></li>
85651
+ <li><p><span data-x="list append">Append</span> <var>newEntry</var> to
85652
+ <var>sessionHistory</var>.</p></li>
85653
+
85654
+ <li><p><span>Traverse the history</span> to <var>newEntry</var>.</p></li>
85660
85655
</ol>
85661
85656
</dd>
85662
85657
</dl>
0 commit comments