Skip to content

Commit

Permalink
Don't set hashChange to true for classic history API navigate events
Browse files Browse the repository at this point in the history
Closes #10389.
  • Loading branch information
domenic committed Jun 20, 2024
1 parent c56e559 commit c43aff8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -94761,6 +94761,10 @@ interface <dfn interface>NavigationDestination</dfn> {
<p>If all of the following are true:</p>

<ul>
<li><p><var>event</var>'s <span
data-x="concept-NavigateEvent-classic-history-API-state">classic history API state</span> is
null;</p></li>

<li><p><var>destination</var>'s <span data-x="concept-NavigationDestination-sameDocument">is
same document</span> is true;</p></li>

Expand All @@ -94776,6 +94780,11 @@ interface <dfn interface>NavigationDestination</dfn> {
<p>then initialize <var>event</var>'s <code
data-x="dom-NavigateEvent-hashChange">hashChange</code> to true. Otherwise, initialize it to
false.</p>

<p class="note">The first condition here means that <code
data-x="dom-NavigateEvent-hashChange">hashChange</code> will be true for <span
data-x="navigate-fragid">fragment navigations</span>, but false for cases like <code
data-x="">history.pushState(undefined, "", "#fragment")</code>.</p>
</li>

<li><p>If <var>userInvolvement</var> is not "<code data-x="uni-none">none</code>", then
Expand Down

0 comments on commit c43aff8

Please sign in to comment.