Skip to content

Commit

Permalink
Disable PageSwapEvent's activation on cross-origin redirects
Browse files Browse the repository at this point in the history
Closes #10196.
  • Loading branch information
noamr committed Mar 27, 2024
1 parent c589287 commit c1b467a
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions source
Expand Up @@ -102159,9 +102159,20 @@ location.href = '#foo';</code></pre>
<li><p>Let <var>activation</var> be null.</p></li>

<li>
<p>If <var>targetEntry</var>'s <span data-x="she-document">document</span>'s <span
data-x="concept-document-origin">origin</span> is <span>same origin</span> with
<var>displayedDocument</var>'s <span data-x="concept-document-origin">origin</span>, then:
<p>If all of the following are true:</p>

<ul>
<li><p><var>targetEntry</var>'s <span data-x="she-document">document</span>'s <span
data-x="concept-document-origin">origin</span> is <span>same origin</span> with
<var>displayedDocument</var>'s <span data-x="concept-document-origin">origin</span>;
and</p></li>

<li><p><var>targetEntry</var>'s <span data-x="she-document">document</span>'s
<span>was created via cross-origin redirects</span> is false, or <var>targetEntry</var>'s
<span data-x="she-document">document</span>'s <span>latest entry</span> is not null,</p></li>
</ul>

<p>then:</p>

<ol>
<li>
Expand Down Expand Up @@ -102203,6 +102214,11 @@ location.href = '#foo';</code></pre>
</dl>
</li>
</ol>

<p class="note">This means that a cross-origin redirect during a navigation would result in a
null <code data-x="dom-PageSwapEvent-activation">activation</code> in the old document's
<code>PageSwapEvent</code>, unless the new document is being restored from <a
href="#note-bfcache">bfcache</a>.</p>
</li>

<li><p><span data-x="concept-event-fire">Fire an event</span> named
Expand Down

0 comments on commit c1b467a

Please sign in to comment.