Skip to content

Commit

Permalink
[giow] (1) Make it ok to window.close() a browsing context that has n…
Browse files Browse the repository at this point in the history
…ever been (re)navigated.

Affected topics: DOM APIs

git-svn-id: http://svn.whatwg.org/webapps@7127 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 8, 2012
1 parent 517d223 commit 3452c26
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 25 deletions.
20 changes: 12 additions & 8 deletions complete.html
Expand Up @@ -65602,14 +65602,18 @@ <h4 id=apis-for-creating-and-navigating-browsing-contexts-by-name><span class=se

<hr><p>The <dfn id=dom-window-close title=dom-window-close><code>close()</code></dfn>
method on <code><a href=#window>Window</a></code> objects should, if the corresponding
<a href=#browsing-context>browsing context</a> <var title="">A</var> is an
<a href=#auxiliary-browsing-context>auxiliary browsing context</a> that was created by a script
(as opposed to by an action of the user), and if the <a href="#script's-browsing-context" title="script's browsing context">browsing context</a> of the
<a href=#concept-script title=concept-script>script</a> that invokes the method
is <a href=#allowed-to-navigate>allowed to navigate</a> the <a href=#browsing-context>browsing
context</a> <var title="">A</var>, close the <a href=#browsing-context>browsing
context</a> <var title="">A</var> (and may <a href=#a-browsing-context-is-discarded title="a
browsing context is discarded">discard</a> it too).</p>
<a href=#browsing-context>browsing context</a> <var title="">A</var> is
<a href=#script-closable>script-closable</a> and the <a href="#script's-browsing-context" title="script's
browsing context">browsing context</a> of the <a href=#concept-script title=concept-script>script</a> that invokes the method is
<a href=#allowed-to-navigate>allowed to navigate</a> the <a href=#browsing-context>browsing context</a>
<var title="">A</var>, close the <a href=#browsing-context>browsing context</a> <var title="">A</var> (and may <a href=#a-browsing-context-is-discarded title="a browsing context is
discarded">discard</a> it too).</p>

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

<p>The <dfn id=dom-window-stop title=dom-window-stop><code>stop()</code></dfn> method
on <code><a href=#window>Window</a></code> objects should, if there is an existing
Expand Down
20 changes: 12 additions & 8 deletions index
Expand Up @@ -65602,14 +65602,18 @@ interface <dfn id=window>Window</dfn> : <a href=#eventtarget>EventTarget</a> {

<hr><p>The <dfn id=dom-window-close title=dom-window-close><code>close()</code></dfn>
method on <code><a href=#window>Window</a></code> objects should, if the corresponding
<a href=#browsing-context>browsing context</a> <var title="">A</var> is an
<a href=#auxiliary-browsing-context>auxiliary browsing context</a> that was created by a script
(as opposed to by an action of the user), and if the <a href="#script's-browsing-context" title="script's browsing context">browsing context</a> of the
<a href=#concept-script title=concept-script>script</a> that invokes the method
is <a href=#allowed-to-navigate>allowed to navigate</a> the <a href=#browsing-context>browsing
context</a> <var title="">A</var>, close the <a href=#browsing-context>browsing
context</a> <var title="">A</var> (and may <a href=#a-browsing-context-is-discarded title="a
browsing context is discarded">discard</a> it too).</p>
<a href=#browsing-context>browsing context</a> <var title="">A</var> is
<a href=#script-closable>script-closable</a> and the <a href="#script's-browsing-context" title="script's
browsing context">browsing context</a> of the <a href=#concept-script title=concept-script>script</a> that invokes the method is
<a href=#allowed-to-navigate>allowed to navigate</a> the <a href=#browsing-context>browsing context</a>
<var title="">A</var>, close the <a href=#browsing-context>browsing context</a> <var title="">A</var> (and may <a href=#a-browsing-context-is-discarded title="a browsing context is
discarded">discard</a> it too).</p>

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

<p>The <dfn id=dom-window-stop title=dom-window-stop><code>stop()</code></dfn> method
on <code><a href=#window>Window</a></code> objects should, if there is an existing
Expand Down
23 changes: 14 additions & 9 deletions source
Expand Up @@ -76904,15 +76904,20 @@ interface <dfn>Window</dfn> : <span>EventTarget</span> {

<p>The <dfn title="dom-window-close"><code>close()</code></dfn>
method on <code>Window</code> objects should, if the corresponding
<span>browsing context</span> <var title="">A</var> is an
<span>auxiliary browsing context</span> that was created by a script
(as opposed to by an action of the user), and if the <span
title="script's browsing context">browsing context</span> of the
<span title="concept-script">script</span> that invokes the method
is <span>allowed to navigate</span> the <span>browsing
context</span> <var title="">A</var>, close the <span>browsing
context</span> <var title="">A</var> (and may <span title="a
browsing context is discarded">discard</span> it too).</p>
<span>browsing context</span> <var title="">A</var> is
<span>script-closable</span> and the <span title="script's
browsing context">browsing context</span> of the <span
title="concept-script">script</span> that invokes the method is
<span>allowed to navigate</span> the <span>browsing context</span>
<var title="">A</var>, close the <span>browsing context</span> <var
title="">A</var> (and may <span title="a browsing context is
discarded">discard</span> it too).</p>

<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>browsing context</span> whose <span>session history</span>
contains only one <code>Document</code>.</p>

<p>The <dfn title="dom-window-stop"><code>stop()</code></dfn> method
on <code>Window</code> objects should, if there is an existing
Expand Down

0 comments on commit 3452c26

Please sign in to comment.