HTML5 Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/7127

SVNBugCommentTime (UTC)
7127[Gecko] [Internet Explorer] [Opera] [Webkit] Make it ok to window.close() a browsing context that has never been (re)navigated.2012-06-08 21:50
Index: source
===================================================================
--- source	(revision 7126)
+++ source	(revision 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>

|