Skip to content

Commit

Permalink
Collapse disowned into opener browsing context
Browse files Browse the repository at this point in the history
Tests: TODO.

Fixes #5569.
  • Loading branch information
annevk committed Feb 10, 2023
1 parent 69998ed commit 621a4f5
Showing 1 changed file with 3 additions and 22 deletions.
25 changes: 3 additions & 22 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -86154,8 +86154,6 @@ dictionary <dfn dictionary>WindowPostMessageOptions</dfn> : <span>StructuredSeri

<li><p>If <var>current</var> is null, then return null.</p></li>

<li><p>If <var>current</var>'s <span>disowned</span> is true, then return null.</p></li>

<li><p>If <var>current</var>'s <span>opener browsing context</span> is null, then return
null.</p></li>

Expand All @@ -86168,29 +86166,14 @@ dictionary <dfn dictionary>WindowPostMessageOptions</dfn> : <span>StructuredSeri
<ol>
<li><p>If the given value is null and <span>this</span>'s <span data-x="window bc">browsing
context</span> is non-null, then set <span>this</span>'s <span data-x="window bc">browsing
context</span>'s <span>disowned</span> to true.</p></li>
context</span>'s <span>opener browsing context</span> to null.</p></li>

<li><p>If the given value is non-null, then return ?
<span>OrdinaryDefineOwnProperty</span>(<span>this</span>, "<code data-x="">opener</code>", {
[[Value]]: the given value, [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true
}).</p></li>
</ol>

<div class="note">
<p>If a <span>browsing context</span>'s <span>disowned</span> is true, its <code
data-x="dom-opener">window.opener</code> attribute is null. That prevents scripts in the
<span>browsing context</span> from changing any properties of its <span>opener browsing
context</span>'s <code>Window</code> object (i.e., the <code>Window</code> object from which the
<span>browsing context</span> was created).</p>

<p>Otherwise, if a <span>browsing context</span>'s <span>disowned</span> is false, then scripts
in that <span>browsing context</span> can use <code data-x="dom-opener">window.opener</code> to
change properties of its <span>opener browsing context</span>'s <code>Window</code> object. For
example, a script running in the <span>browsing context</span> can change the value of <code
data-x="">window.opener.location</code>, causing the <span>opener browsing context</span> to
navigate to a completely different document.</p>
</div>

<p>The <dfn attribute for="Window"><code data-x="dom-parent">parent</code></dfn> getter steps
are:</p>

Expand Down Expand Up @@ -89358,8 +89341,6 @@ interface <dfn interface>BeforeUnloadEvent</dfn> : <span>Event</span> {
<li><p>An <dfn data-x="opener-origin-at-creation">opener origin at creation</dfn>, an
<span>origin</span> or null, initially null.</p>

<li><p>A <dfn id="disowned-its-opener">disowned</dfn> boolean, initially false.</p></li>

<li>
<p>An <dfn>is popup</dfn> boolean, initially false.</p>

Expand Down Expand Up @@ -91318,7 +91299,7 @@ location.href = '#foo';</code></pre>

<li><p><var>historyEntry</var>'s <span data-x="she-document">document</span>'s <span
data-x="concept-document-bc">browsing context</span> is not an <span>auxiliary browsing
context</span> whose <span>disowned</span> is false; and</p></li>
context</span> whose <span>opener browsing context</span> is non-null; and</p></li>

<li><p><var>historyEntry</var>'s <span data-x="she-document">document</span>'s <span
data-x="concept-document-origin">origin</span> is not <var>navigable</var>'s <span
Expand Down Expand Up @@ -93605,7 +93586,7 @@ location.href = '#foo';</code></pre>

<li><p><var>targetEntry</var>'s <span data-x="she-document">document</span>'s <span
data-x="concept-document-bc">browsing context</span> is not an <span>auxiliary browsing
context</span> whose <span>disowned</span> is false; and</p></li>
context</span> whose <span>opener browsing context</span> is non-null; and</p></li>

<li><p><var>targetEntry</var>'s <span data-x="she-document">document</span>'s <span
data-x="concept-document-origin">origin</span> is not <var>oldOrigin</var></p></li>
Expand Down

0 comments on commit 621a4f5

Please sign in to comment.