- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 03 Sep 2009 09:38:18 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec In directory hutz:/tmp/cvs-serv2929 Modified Files: Overview.html Log Message: Make document.open() throw INVALID_STATE_ERR when called on an xml doc instead of turning it into an HTML doc. (whatwg r3735) Index: Overview.html =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.2908 retrieving revision 1.2909 diff -u -d -r1.2908 -r1.2909 --- Overview.html 2 Sep 2009 23:27:50 -0000 1.2908 +++ Overview.html 3 Sep 2009 09:38:15 -0000 1.2909 @@ -174,7 +174,7 @@ <h2 class="no-num no-toc" id="a-vocabulary-and-associated-apis-for-html-and-xhtml">A vocabulary and associated APIs for HTML and XHTML</h2> <!--ZZZ:--> <h2 class="no-num no-toc" id="w3c-working-draft-25-august-2009">W3C Working Draft 25 August 2009</h2> - <!--<h2 class="no-num no-toc">Editor's Draft 2 September 2009</h2>--> + <!--<h2 class="no-num no-toc">Editor's Draft 3 September 2009</h2>--> <!--:ZZZ--> <dl><!-- ZZZ: update the month/day (twice), (un)comment out--><dt>This Version:</dt> <dd><a href="http://www.w3.org/TR/2009/WD-html5-20090825/">http://www.w3.org/TR/2009/WD-html5-20090825/</a></dd> @@ -272,7 +272,7 @@ track. <!--ZZZ:--> This specification is the 25 August 2009 Working Draft. - <!--This specification is the 2 September 2009 Editor's Draft.--> + <!--This specification is the 3 September 2009 Editor's Draft.--> <!--:ZZZ--> </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- relationship to other work (required) --><p>This specification is also being produced by the <a href="http://www.whatwg.org/">WHATWG</a>. The two specifications are identical from the table of contents onwards.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- context and rationale (required) --><p>This specification is intended to replace (be a new version of) @@ -5976,10 +5976,9 @@ documents</dfn> when they are created. Whether a document is an <a href="#html-documents" title="HTML documents">HTML document</a> or an <a href="#xml-documents" title="XML documents">XML document</a> affects the behavior of certain APIs, as well as a few CSS rendering rules. <a href="#refsCSS">[CSS]</a><p class="note">A <code>Document</code> object created by the <code title="">createDocument()</code> API on the - <code>DOMImplementation</code> object is initially an <a href="#xml-documents" title="XML documents">XML document</a>, but can be made into an - <a href="#html-documents" title="HTML documents">HTML document</a> by calling <code title="dom-document-open"><a href="#dom-document-open">document.open()</a></code> on it. A - <code>Document</code> object created by the <a href="#html-parser">HTML parser</a> - for a <code><a href="#text-html">text/html</a></code> resource will be flagged as an <a href="#html-documents" title="HTML documents">HTML document</a> also.<h4 id="documents-in-the-dom"><span class="secno">3.1.1 </span>Documents in the DOM</h4><p>All <code>Document</code> objects (in user agents implementing + <code>DOMImplementation</code> object is flagged as an <a href="#xml-documents" title="XML documents">XML document</a>. A <code>Document</code> + object created by the <a href="#html-parser">HTML parser</a> for a + <code><a href="#text-html">text/html</a></code> resource will be flagged as an <a href="#html-documents" title="HTML documents">HTML document</a>.<h4 id="documents-in-the-dom"><span class="secno">3.1.1 </span>Documents in the DOM</h4><p>All <code>Document</code> objects (in user agents implementing this specification) <span class="impl">must</span> also implement the <code><a href="#htmldocument">HTMLDocument</a></code> interface, available using binding-specific methods. (This is the case whether or not the @@ -8435,6 +8434,10 @@ <p>The method has no effect if the <code>Document</code> is still being parsed.</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> <dt><var title="">window</var> = <var title="">document</var> . <code title="dom-document-open"><a href="#dom-document-open">open</a></code>( <var title="">url</var>, <var title="">name</var>, <var title="">features</var> [, <var title="">replace</var> ] )</dt> @@ -8451,7 +8454,11 @@ <p>When called with two or fewer arguments, the method must act as follows:</p> - <ol><li><p>Let <var title="">type</var> be the value of the first + <ol><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> + + <li><p>Let <var title="">type</var> be the value of the first argument, if there is one, or "<code><a href="#text-html">text/html</a></code>" otherwise.</li> @@ -8528,9 +8535,6 @@ an end-of-file token). The encoding <a href="#concept-encoding-confidence" title="concept-encoding-confidence">confidence</a> is <i>irrelevant</i>.</li> - <li>Mark the document as being an <a href="#html-documents" title="HTML documents">HTML - document</a> (it might already be so-marked).</li> - <li> <!-- text/plain handling -->
Received on Thursday, 3 September 2009 09:38:28 UTC