W3C home > Mailing lists > Public > public-html-commits@w3.org > October 2009

html5/spec Overview.html,1.3352,1.3353

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 20 Oct 2009 11:13:40 +0000
To: public-html-commits@w3.org
Message-Id: <E1N0Ceq-0003kq-PM@lionel-hutz.w3.org>
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv14418

Modified Files:
	Overview.html 
Log Message:
Define createHTMLDocument(). (whatwg r4207)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.3352
retrieving revision 1.3353
diff -u -d -r1.3352 -r1.3353
--- Overview.html	20 Oct 2009 10:35:14 -0000	1.3352
+++ Overview.html	20 Oct 2009 11:13:37 -0000	1.3353
@@ -428,7 +428,8 @@
      <li><a href="#documents-in-the-dom"><span class="secno">3.1.1 </span>Documents in the DOM</a></li>
      <li><a href="#security"><span class="secno">3.1.2 </span>Security</a></li>
      <li><a href="#resource-metadata-management"><span class="secno">3.1.3 </span>Resource metadata management</a></li>
-     <li><a href="#dom-tree-accessors"><span class="secno">3.1.4 </span>DOM tree accessors</a></ol></li>
+     <li><a href="#dom-tree-accessors"><span class="secno">3.1.4 </span>DOM tree accessors</a></li>
+     <li><a href="#creating-documents"><span class="secno">3.1.5 </span>Creating documents</a></ol></li>
    <li><a href="#elements"><span class="secno">3.2 </span>Elements</a>
     <ol>
      <li><a href="#semantics-0"><span class="secno">3.2.1 </span>Semantics</a></li>
@@ -5959,17 +5960,15 @@
   page. <span class="impl"><a href="#the-document-s-current-address">The document's current address</a>
   must be set to <a href="#the-document-s-address">the document's address</a> when the
   <code>Document</code> is created.</span><p class="note">Interactive user agents typically expose <a href="#the-document-s-current-address">the
-  document's current address</a> in their user interface.<p>When a <code>Document</code> is created by a <a href="#concept-script" title="concept-script">script</a> using the <code title="">createDocument()</code> API, <a href="#the-document-s-address">the document's
-  address</a> is the same as <a href="#the-document-s-address">the document's address</a> of
-  the <a href="#active-document">active document</a> of the <a href="#script-s-browsing-context">script's browsing
-  context</a>.<p><code>Document</code> objects are assumed to be <dfn id="xml-documents">XML
+  document's current address</a> in their user interface.<p>When a <code>Document</code> is created by a <a href="#concept-script" title="concept-script">script</a> using the <code title="dom-DOMImplementation-createDocument">createDocument()</code>
+  or <code title="dom-DOMHTMLImplementation-createHTMLDocument"><a href="#dom-domhtmlimplementation-createhtmldocument">createHTMLDocument()</a></code>
+  APIs, <a href="#the-document-s-address">the document's address</a> is the same as <a href="#the-document-s-address">the
+  document's address</a> of the <a href="#active-document">active document</a> of the
+  <a href="#script-s-browsing-context">script's browsing context</a>.<p><code>Document</code> objects are assumed to be <dfn id="xml-documents">XML
   documents</dfn> unless they are flagged as being <dfn id="html-documents">HTML
   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 and the case-sensitivity of some selectors.<p class="note">A <code>Document</code> object created by the <code title="">createDocument()</code> API on the
-  <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 class="XXX annotation"><b>Status: </b><i>Last call for comments</i><p>All <code>Document</code> objects (in user agents implementing
+  certain APIs and the case-sensitivity of some selectors.<h4 id="documents-in-the-dom"><span class="secno">3.1.1 </span>Documents in the DOM</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><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
@@ -6693,7 +6692,43 @@
   </div><hr><p class="note">The <code title="dom-document-dir"><a href="#dom-document-dir">dir</a></code>
   attribute on the <code><a href="#htmldocument">HTMLDocument</a></code> interface is defined
   along with the <code title="attr-dir"><a href="#the-dir-attribute">dir</a></code> content
-  attribute.<h3 id="elements"><span class="secno">3.2 </span>Elements</h3><h4 id="semantics-0"><span class="secno">3.2.1 </span>Semantics</h4><p class="XXX annotation"><b>Status: </b><i>Implemented and widely deployed. </i><span><a href="http://www.w3.org/html/wg/tracker/issues/41">ISSUE-41</a> (Decentralized-extensibility) blocks progress to Last Call</span><p>Elements, attributes, and attribute values in HTML are defined
+  attribute.<h4 id="creating-documents"><span class="secno">3.1.5 </span>Creating documents</h4><p><a href="#xml-documents">XML documents</a> can be created from script using the
+  DOM <code title="dom-DOMImplementation-createDocument">createDocument()</code>
+  method on the <code>DOMImplementation</code> interface.<p><a href="#html-documents">HTML documents</a> can be created using the <code title="dom-DOMHTMLImplementation-createHTMLDocument"><a href="#dom-domhtmlimplementation-createhtmldocument">createHTMLDocument()</a></code>
+  method:<pre>[Supplemental, NoInterfaceObject]
+interface <dfn id="domhtmlimplementation">DOMHTMLImplementation</dfn> {
+  <span>Document</span> <a href="#dom-domhtmlimplementation-createhtmldocument" title="dom-DOMHTMLImplementation-createHTMLDocument">createHTMLDocument</a>(in DOMString title);
+};
+<span>DOMImplementation</span> implements <a href="#domhtmlimplementation">DOMHTMLImplementation</a>;</pre><p>The <dfn id="dom-domhtmlimplementation-createhtmldocument" title="dom-DOMHTMLImplementation-createHTMLDocument"><code>createHTMLDocument(<var title="">title</var>)</code></dfn> method, when invoked, must run the
+  following steps:<ol><li><p>Let <var title="">doc</var> be a newly created
+   <code>Document</code> object.</li>
+
+   <li><p>Mark <var title="">doc</var> as being an <a href="#html-documents" title="HTML
+   documents">HTML document</a>.</li>
+
+   <li><p>Create a <code>DocumentType</code> node with the <code title="">name</code> attribute set to the string "<code title="">html</code>", and the other attributes specific to
+   <code>DocumentType</code> objects set to the empty string, null,
+   and empty lists, as appropriate. Append the newly created node to
+   <var title="">doc</var>.</li>
+
+   <li><p>Create an <code><a href="#the-html-element-0">html</a></code> element, and append it to <var title="">doc</var>.</li>
+
+   <li><p>Create a <code><a href="#the-head-element-0">head</a></code> element, and append it to the
+   <code><a href="#the-html-element-0">html</a></code> element created in the previous step.</p>
+
+   <li><p>Create a <code><a href="#the-title-element-0">title</a></code> element, and append it to the
+   <code><a href="#the-head-element-0">head</a></code> element created in the previous step.</p>
+
+   <li><p>Create a <code>Text</code> node, and set its <code title="">data</code> attribute to the string given by the method's
+   argument (which could be the empty string). Append it to the
+   <code><a href="#the-title-element-0">title</a></code> element created in the previous step.</p>
+
+   <li><p>Create a <code><a href="#the-body-element-0">body</a></code> element, and append it to the
+   <code><a href="#the-html-element-0">html</a></code> element created in the earlier step.</p>
+
+   <li><p>Return <var title="">doc</var>.</li>
+
+  </ol><h3 id="elements"><span class="secno">3.2 </span>Elements</h3><h4 id="semantics-0"><span class="secno">3.2.1 </span>Semantics</h4><p class="XXX annotation"><b>Status: </b><i>Implemented and widely deployed. </i><span><a href="http://www.w3.org/html/wg/tracker/issues/41">ISSUE-41</a> (Decentralized-extensibility) blocks progress to Last Call</span><p>Elements, attributes, and attribute values in HTML are defined
   (by this specification) to have certain meanings (semantics). For
   example, the <code><a href="#the-ol-element">ol</a></code> element represents an ordered list, and
   the <code title="attr-lang"><a href="#attr-lang">lang</a></code> attribute represents the
@@ -42244,7 +42279,8 @@
 
      <dt>If a <code>Document</code> or image was obtained in some
      other manner (e.g. a <code title="">data:</code> URL typed in by
-     the user, a <code>Document</code> created using the <code title="">createDocument()</code> API, etc)</dt>
+     the user, a <code>Document</code> created using the <code title="dom-DOMImplementation-createDocument">createDocument()</code>
+     API, etc)</dt>
 
      <dd>The <a href="#origin">origin</a> is a globally unique identifier
      assigned when the <code>Document</code> or image is created.</dd>
Received on Tuesday, 20 October 2009 11:13:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 20 October 2009 11:13:45 GMT