Skip to content
Permalink
Browse files

[giow] (1) Make it ok to window.close() a browsing context that has n…

…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 3452c26e03cd672bdf82831cc681d685506ba120
Showing with 38 additions and 25 deletions.
  1. +12 −8 complete.html
  2. +12 −8 index
  3. +14 −9 source

<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
20 index

<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
23 source

<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

0 comments on commit 3452c26

Please sign in to comment.
You can’t perform that action at this time.