[html5] r3836 - [gow] (2) Bring document.close() in XML in line with the other API methods from [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Sep 14 00:08:21 PDT 2009


Author: ianh
Date: 2009-09-14 00:08:20 -0700 (Mon, 14 Sep 2009)
New Revision: 3836

Modified:
   index
   source
Log:
[gow] (2) Bring document.close() in XML in line with the other API methods from this set, and in line with gecko/webkit

Modified: index
===================================================================
--- index	2009-09-14 07:02:40 UTC (rev 3835)
+++ index	2009-09-14 07:08:20 UTC (rev 3836)
@@ -9579,16 +9579,28 @@
 
     <p>Closes the input stream that was opened by the <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> method.</p>
 
+    <p>Throws an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception if the
+    <code>Document</code> is an <a href=#xml-documents title="XML documents">XML
+    document</a>.</p>
+
    </dd>
 
   </dl><div class=impl>
 
+
+   <li>If the <code>Document</code> object is not flagged as an <a href=#html-documents title="HTML documents">HTML document</a>, throw an
+   <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception and abort these
+   steps.</li>
+
   <p>The <dfn id=dom-document-close title=dom-document-close><code>close()</code></dfn>
-  method must do nothing if there is no <a href=#script-created-parser>script-created
-  parser</a> associated with the document. If there is such a
-  parser, then, when the method is called, the user agent must insert
-  an <a href=#explicit-eof-character>explicit "EOF" character</a> at the end of the parser's
-  <a href=#the-input-stream>input stream</a>.</p>
+  method must throw an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception if the
+  <code>Document</code> object is not flagged as an <a href=#html-documents title="HTML
+  documents">HTML document</a>. Otherwise, if there is a
+  <a href=#script-created-parser>script-created parser</a> associated with the document,
+  then, when the method is called, the user agent must insert an
+  <a href=#explicit-eof-character>explicit "EOF" character</a> at the end of the parser's
+  <a href=#the-input-stream>input stream</a>. Otherwise, the method must do
+  nothing.</p>
 
   </div>
 

Modified: source
===================================================================
--- source	2009-09-14 07:02:40 UTC (rev 3835)
+++ source	2009-09-14 07:08:20 UTC (rev 3836)
@@ -9923,18 +9923,31 @@
     <p>Closes the input stream that was opened by the <code
     title="dom-document-open">document.open()</code> method.</p>
 
+    <p>Throws an <code>INVALID_STATE_ERR</code> exception if the
+    <code>Document</code> is an <span title="XML documents">XML
+    document</span>.</p>
+
    </dd>
 
   </dl>
 
   <div class="impl">
 
+
+   <li>If the <code>Document</code> object is not flagged as an <span
+   title="HTML documents">HTML document</span>, throw an
+   <code>INVALID_STATE_ERR</code> exception and abort these
+   steps.</li>
+
   <p>The <dfn title="dom-document-close"><code>close()</code></dfn>
-  method must do nothing if there is no <span>script-created
-  parser</span> associated with the document. If there is such a
-  parser, then, when the method is called, the user agent must insert
-  an <span>explicit "EOF" character</span> at the end of the parser's
-  <span>input stream</span>.</p>
+  method must throw an <code>INVALID_STATE_ERR</code> exception if the
+  <code>Document</code> object is not flagged as an <span title="HTML
+  documents">HTML document</span>. Otherwise, if there is a
+  <span>script-created parser</span> associated with the document,
+  then, when the method is called, the user agent must insert an
+  <span>explicit "EOF" character</span> at the end of the parser's
+  <span>input stream</span>. Otherwise, the method must do
+  nothing.</p>
 
   </div>
 




More information about the Commit-Watchers mailing list