Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup Window's close(d) members #4402

Merged
merged 7 commits into from
Mar 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 37 additions & 21 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -77111,6 +77111,9 @@ dictionary <dfn>DragEventInit</dfn> : <span>MouseEventInit</span> {
<p>A <span>browsing context</span> has a <dfn id="disowned-its-opener">disowned</dfn> boolean. It
is initially false.</p>

<p>A <span>browsing context</span> has an <dfn>is closing</dfn> boolean. It is initially
false.</p>
annevk marked this conversation as resolved.
Show resolved Hide resolved

<p>A <span>browsing context</span> has a <span>session history</span>, which lists the
<code>Document</code> objects that the <span>browsing context</span> has presented, is presenting,
or will present. A <span>browsing context</span>'s <dfn data-export="">active document</dfn> is
Expand Down Expand Up @@ -78840,8 +78843,7 @@ dictionary <dfn>WindowPostMessageOptions</dfn> : <span>PostMessageOptions</span>

<hr>

<p>The <dfn><code data-x="dom-name">name</code></dfn> attribute's getter, when invoked, must run
these steps:</p>
<p>The <dfn><code data-x="dom-name">name</code></dfn> attribute's getter must run these steps:</p>

<ol>
<li><p>If this <code>Window</code> object's <span data-x="window bc">browsing context</span> is
Expand All @@ -78851,8 +78853,7 @@ dictionary <dfn>WindowPostMessageOptions</dfn> : <span>PostMessageOptions</span>
context</span>'s <span data-x="browsing context name">name</span>.</p></li>
</ol>

<p>The <code data-x="dom-name">name</code> attribute's setter, when invoked, must run these
steps:</p>
<p>The <code data-x="dom-name">name</code> attribute's setter must run these steps:</p>

<ol>
<li><p>If this <code>Window</code> object's <span data-x="window bc">browsing context</span> is
Expand All @@ -78867,35 +78868,50 @@ dictionary <dfn>WindowPostMessageOptions</dfn> : <span>PostMessageOptions</span>

<hr>

<p>The <dfn><code data-x="dom-window-close">close()</code></dfn> method on <code>Window</code>
objects should, if all the following conditions are met, <span data-x="close a browsing
context">close</span> the <span>browsing context</span> <var>A</var>:
<p>The <dfn><code data-x="dom-window-close">close()</code></dfn> method must run these steps:

<ul class="brief">
<ol>
<li><p>Let <var>current</var> be this <code>Window</code> object's <span data-x="window
bc">browsing context</span>.</p></li>

<li><p>If <var>current</var> is null or its <span>is closing</span> is true, then
return.</p></li>

<li>
<p>If all the following are true</p>

<ul class="brief">
<li><var>current</var> is <span>script-closable</span></li>

<li>The corresponding <span>browsing context</span> <var>A</var> is
<span>script-closable</span>.</li>
<li>the <span>incumbent settings object</span>'s <span>responsible browsing context</span> is
<span>familiar with</span> <var>current</var> </li>

<li>The <span>responsible browsing context</span> specified by the <span>incumbent settings
object</span> is <span>familiar with</span> the <span>browsing context</span> <var>A</var>.</li>
<li id="sandboxClose">the <span>incumbent settings object</span>'s <span>responsible browsing
context</span> is <span>allowed to navigate</span> <var>current</var></li>
annevk marked this conversation as resolved.
Show resolved Hide resolved
</ul>

<li id="sandboxClose">The <span>responsible browsing context</span> specified by the
<span>incumbent settings object</span> is <span>allowed to navigate</span> the <span>browsing
context</span> <var>A</var>.</li>
<p>then:</p>

</ul>
<ol>
<li><p>Set <var>current</var>'s <span>is closing</span> to true.</p></li>

<li><p><span>Queue a task</span> on the <span>DOM manipulation task source</span> to <span
data-x="close a browsing context">close</span> <var>current</var>.</p></li>
annevk marked this conversation as resolved.
Show resolved Hide resolved
</ol>
</li>
</ol>

<p>A <span>browsing context</span> is <dfn>script-closable</dfn> if it is an <span>auxiliary
browsing context</span> that was created by a script (as opposed to by an action of the user), or
if it is a <span>top-level browsing context</span> whose <span>session history</span> contains
only one <code>Document</code>.</p>

<p>The <dfn><code data-x="dom-window-closed">closed</code></dfn> attribute on <code>Window</code>
objects must return true if the <code>Window</code> object's <span>browsing context</span> has
been <span data-x="a browsing context is discarded">discarded</span>, and false otherwise.</p>
<p>The <dfn><code data-x="dom-window-closed">closed</code></dfn> attribute's getter must return
true if this <code>Window</code> object's <span data-x="window bc">browsing context</span> is
null or its <span>is closing</span> is true, and false otherwise.</p>

<p>The <dfn><code data-x="dom-window-stop">stop()</code></dfn> method on <code>Window</code>
objects must <span>stop document loading</span> given this <code>Window</code> object's <span
<p>The <dfn><code data-x="dom-window-stop">stop()</code></dfn> method must <span>stop document
loading</span> given this <code>Window</code> object's <span
data-x="concept-document-window">associated <code>Document</code></span>.</p>

</div>
Expand Down