[html5] r7127 - [giow] (1) Make it ok to window.close() a browsing context that has never been ( [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Jun 8 14:50:20 PDT 2012


Author: ianh
Date: 2012-06-08 14:50:19 -0700 (Fri, 08 Jun 2012)
New Revision: 7127

Modified:
   complete.html
   index
   source
Log:
[giow] (1) Make it ok to window.close() a browsing context that has never been (re)navigated.
Affected topics: DOM APIs

Modified: complete.html
===================================================================
--- complete.html	2012-06-08 21:33:58 UTC (rev 7126)
+++ complete.html	2012-06-08 21:50:19 UTC (rev 7127)
@@ -65602,15 +65602,19 @@
 
   <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
   attempt to <a href=#navigate>navigate</a> the <a href=#browsing-context>browsing context</a>

Modified: index
===================================================================
--- index	2012-06-08 21:33:58 UTC (rev 7126)
+++ index	2012-06-08 21:50:19 UTC (rev 7127)
@@ -65602,15 +65602,19 @@
 
   <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
   attempt to <a href=#navigate>navigate</a> the <a href=#browsing-context>browsing context</a>

Modified: source
===================================================================
--- source	2012-06-08 21:33:58 UTC (rev 7126)
+++ source	2012-06-08 21:50:19 UTC (rev 7127)
@@ -76904,16 +76904,21 @@
 
   <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
   attempt to <span>navigate</span> the <span>browsing context</span>




More information about the Commit-Watchers mailing list