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 whatwg#10196.
  • Loading branch information
noamr authored and rubberyuzu committed Apr 8, 2024
1 parent c52dc4a commit d2887e5
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -102459,9 +102459,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 @@ -102503,6 +102514,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 d2887e5

Please sign in to comment.