Skip to content

Commit

Permalink
Fix window.close() navigable reference
Browse files Browse the repository at this point in the history
Also clean up the initial steps by using some convenience definitions.

Closes #10418. Note that this does not help with #1866.
  • Loading branch information
domenic committed Jun 21, 2024
1 parent c43aff8 commit b8db698
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -89463,20 +89463,11 @@ dictionary <dfn dictionary>WindowPostMessageOptions</dfn> : <span>StructuredSeri
are:</p>

<ol>
<li><p>Let <var>thisTraversable</var> be null.</p></li>

<li><p><span data-x="list iterate">For each</span> <span>top-level traversable</span>
<var>traversable</var> of the user agent's <span>top-level traversable set</span>: if
<var>traversable</var>'s <span data-x="nav-document">active document</span>'s <span>relevant
global object</span> equals <span>this</span>, then set <var>thisTraversable</var> to
<var>traversable</var> and <span>break</span>.</p></li>

<li>
<p>If <var>thisTraversable</var> is null, then return.</p>
<li><p>Let <var>thisTraversable</var> be <span>this</span>'s <span data-x="window
navigable">navigable</span>.</p></li>

<p class="note">In this case the method is being called on a <code>Window</code> that does not
correspond to a <span>top-level traversable</span>, and so closing is not allowed.</p>
</li>
<li><p>If <var>thisTraversable</var> is not a <span>top-level traversable</span>, then
return.</p></li>

<li><p>If <var>thisTraversable</var>'s <span>is closing</span> is true, then return.</p></li>

Expand All @@ -89498,8 +89489,9 @@ dictionary <dfn dictionary>WindowPostMessageOptions</dfn> : <span>StructuredSeri
<var>browsingContext</var>; and</p></li>

<li id="sandboxClose"><p>the <span data-x="concept-incumbent-global">incumbent global
object</span>'s <span>node navigable</span> is <span>allowed by sandboxing to navigate</span>
<var>thisTraversable</var>, given <var>sourceSnapshotParams</var></p></li>
object</span>'s <span data-x="window navigable">navigable</span> is <span>allowed by
sandboxing to navigate</span> <var>thisTraversable</var>, given
<var>sourceSnapshotParams</var></p></li>
</ul>

<p>then:</p>
Expand Down

0 comments on commit b8db698

Please sign in to comment.