Skip to content

Commit

Permalink
[e] (0) Move createHTMLDocument() to DOM Core.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@6332 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jul 27, 2011
1 parent a5dbc2b commit 3f09c16
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 201 deletions.
66 changes: 3 additions & 63 deletions complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,7 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2>
<li><a href=#security-document><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></li>
<li><a href=#creating-documents><span class=secno>3.1.5 </span>Creating documents</a></li>
<li><a href=#loading-xml-documents><span class=secno>3.1.6 </span>Loading XML documents</a></ol></li>
<li><a href=#loading-xml-documents><span class=secno>3.1.5 </span>Loading XML 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>
Expand Down Expand Up @@ -8808,7 +8807,7 @@ <h3 id=documents><span class=secno>3.1 </span>Documents</h3>
document's current address</a> in their user interface.</p>

<p>When a <code><a href=#document>Document</a></code> is created by a <a href=#concept-script title=concept-script>script</a> using the <code title=dom-DOMImplementation-createDocument><a href=#dom-domimplementation-createdocument>createDocument()</a></code>
or <code title=dom-DOMHTMLImplementation-createHTMLDocument><a href=#dom-domhtmlimplementation-createhtmldocument>createHTMLDocument()</a></code>
or <code title=dom-DOMHTMLImplementation-createHTMLDocument>createHTMLDocument()</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="#script's-document">script's document</a>.</p>

Expand Down Expand Up @@ -9579,68 +9578,9 @@ <h4 id=dom-tree-accessors><span class=secno>3.1.4 </span><dfn>DOM tree accessors



<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
<code title=dom-DOMImplementation-createDocument><a href=#dom-domimplementation-createdocument>createDocument()</a></code>
method on the <code><a href=#domimplementation>DOMImplementation</a></code> interface.</p>

<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:</p>

<pre class=idl>[NoInterfaceObject]
interface <dfn id=domhtmlimplementation>DOMHTMLImplementation</dfn> {
<a href=#document>Document</a> <a href=#dom-domhtmlimplementation-createhtmldocument title=dom-DOMHTMLImplementation-createHTMLDocument>createHTMLDocument</a>(in DOMString title);
};
<a href=#domimplementation>DOMImplementation</a> implements <a href=#domhtmlimplementation>DOMHTMLImplementation</a>;</pre>

<dl class=domintro><dt><var title="">document</var> = <var title="">document</var> . <code title=dom-document-implementation>implementation</code> . <code title=dom-DOMHTMLImplementation-createHTMLDocument><a href=#dom-domhtmlimplementation-createhtmldocument>createHTMLDocument</a></code>( <var title="">title</var> )</dt>
<dd>

<p>Returns a new <code><a href=#document>Document</a></code>, with a basic DOM already
constructed with an appropriate <code><a href=#the-title-element>title</a></code> element.</p>

</dd>

</dl><div class=impl>

<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:</p>

<ol><li><p>Let <var title="">doc</var> be a newly created
<code><a href=#document>Document</a></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><a href=#documenttype>DocumentType</a></code> node with the <code title="">name</code> attribute set to the string "<code title="">html</code>", and the other attributes specific to
<code><a href=#documenttype>DocumentType</a></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>html</a></code> element, and append it to <var title="">doc</var>.</li>

<li><p>Create a <code><a href=#the-head-element>head</a></code> element, and append it to the
<code><a href=#the-html-element>html</a></code> element created in the previous step.</p>

<li><p>Create a <code><a href=#the-title-element>title</a></code> element, and append it to the
<code><a href=#the-head-element>head</a></code> element created in the previous step.</p>

<li><p>Create a <code><a href=#text>Text</a></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>title</a></code> element created in the previous step.</p>

<li><p>Create a <code><a href=#the-body-element>body</a></code> element, and append it to the
<code><a href=#the-html-element>html</a></code> element created in the earlier step.</p>

<li><p>Return <var title="">doc</var>.</li>

</ol></div>


<div class=impl> <!-- very deprecated API; use XHR instead -->

<h4 id=loading-xml-documents><span class=secno>3.1.6 </span>Loading XML documents</h4>
<h4 id=loading-xml-documents><span class=secno>3.1.5 </span>Loading XML documents</h4>

<p>A <code><a href=#document>Document</a></code> object that is an <a href=#xml-documents title="XML
documents">XML document</a> that was created by the <code title=dom-DOMImplementation-createDocument><a href=#dom-domimplementation-createdocument>DOMImplementation.createDocument()</a></code>
Expand Down
66 changes: 3 additions & 63 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,7 @@
<li><a href=#security-document><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></li>
<li><a href=#creating-documents><span class=secno>3.1.5 </span>Creating documents</a></li>
<li><a href=#loading-xml-documents><span class=secno>3.1.6 </span>Loading XML documents</a></ol></li>
<li><a href=#loading-xml-documents><span class=secno>3.1.5 </span>Loading XML 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>
Expand Down Expand Up @@ -8677,7 +8676,7 @@ interface <dfn id=transferable>Transferable</dfn> { };</pre>
document's current address</a> in their user interface.</p>

<p>When a <code><a href=#document>Document</a></code> is created by a <a href=#concept-script title=concept-script>script</a> using the <code title=dom-DOMImplementation-createDocument><a href=#dom-domimplementation-createdocument>createDocument()</a></code>
or <code title=dom-DOMHTMLImplementation-createHTMLDocument><a href=#dom-domhtmlimplementation-createhtmldocument>createHTMLDocument()</a></code>
or <code title=dom-DOMHTMLImplementation-createHTMLDocument>createHTMLDocument()</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="#script's-document">script's document</a>.</p>

Expand Down Expand Up @@ -9448,68 +9447,9 @@ interface <dfn id=htmldocument>HTMLDocument</dfn> {



<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
<code title=dom-DOMImplementation-createDocument><a href=#dom-domimplementation-createdocument>createDocument()</a></code>
method on the <code><a href=#domimplementation>DOMImplementation</a></code> interface.</p>

<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:</p>

<pre class=idl>[NoInterfaceObject]
interface <dfn id=domhtmlimplementation>DOMHTMLImplementation</dfn> {
<a href=#document>Document</a> <a href=#dom-domhtmlimplementation-createhtmldocument title=dom-DOMHTMLImplementation-createHTMLDocument>createHTMLDocument</a>(in DOMString title);
};
<a href=#domimplementation>DOMImplementation</a> implements <a href=#domhtmlimplementation>DOMHTMLImplementation</a>;</pre>

<dl class=domintro><dt><var title="">document</var> = <var title="">document</var> . <code title=dom-document-implementation>implementation</code> . <code title=dom-DOMHTMLImplementation-createHTMLDocument><a href=#dom-domhtmlimplementation-createhtmldocument>createHTMLDocument</a></code>( <var title="">title</var> )</dt>
<dd>

<p>Returns a new <code><a href=#document>Document</a></code>, with a basic DOM already
constructed with an appropriate <code><a href=#the-title-element>title</a></code> element.</p>

</dd>

</dl><div class=impl>

<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:</p>

<ol><li><p>Let <var title="">doc</var> be a newly created
<code><a href=#document>Document</a></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><a href=#documenttype>DocumentType</a></code> node with the <code title="">name</code> attribute set to the string "<code title="">html</code>", and the other attributes specific to
<code><a href=#documenttype>DocumentType</a></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>html</a></code> element, and append it to <var title="">doc</var>.</li>

<li><p>Create a <code><a href=#the-head-element>head</a></code> element, and append it to the
<code><a href=#the-html-element>html</a></code> element created in the previous step.</p>

<li><p>Create a <code><a href=#the-title-element>title</a></code> element, and append it to the
<code><a href=#the-head-element>head</a></code> element created in the previous step.</p>

<li><p>Create a <code><a href=#text>Text</a></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>title</a></code> element created in the previous step.</p>

<li><p>Create a <code><a href=#the-body-element>body</a></code> element, and append it to the
<code><a href=#the-html-element>html</a></code> element created in the earlier step.</p>

<li><p>Return <var title="">doc</var>.</li>

</ol></div>


<div class=impl> <!-- very deprecated API; use XHR instead -->

<h4 id=loading-xml-documents><span class=secno>3.1.6 </span>Loading XML documents</h4>
<h4 id=loading-xml-documents><span class=secno>3.1.5 </span>Loading XML documents</h4>

<p>A <code><a href=#document>Document</a></code> object that is an <a href=#xml-documents title="XML
documents">XML document</a> that was created by the <code title=dom-DOMImplementation-createDocument><a href=#dom-domimplementation-createdocument>DOMImplementation.createDocument()</a></code>
Expand Down
75 changes: 0 additions & 75 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -9714,81 +9714,6 @@ interface <dfn>HTMLDocument</dfn> {



<h4>Creating documents</h4>

<p><span>XML documents</span> can be created from script using the
<code
title="dom-DOMImplementation-createDocument">createDocument()</code>
method on the <code>DOMImplementation</code> interface.</p>

<p><span>HTML documents</span> can be created using the <code
title="dom-DOMHTMLImplementation-createHTMLDocument">createHTMLDocument()</code>
method:</p>

<pre class="idl">[NoInterfaceObject]
interface <dfn>DOMHTMLImplementation</dfn> {
<span>Document</span> <span title="dom-DOMHTMLImplementation-createHTMLDocument">createHTMLDocument</span>(in DOMString title);
};
<span>DOMImplementation</span> implements <span>DOMHTMLImplementation</span>;</pre>

<dl class="domintro">

<dt><var title="">document</var> = <var title="">document</var> . <code title="dom-document-implementation">implementation</code> . <code title="dom-DOMHTMLImplementation-createHTMLDocument">createHTMLDocument</code>( <var title="">title</var> )</dt>
<dd>

<p>Returns a new <code>Document</code>, with a basic DOM already
constructed with an appropriate <code>title</code> element.</p>

</dd>

</dl>

<div class="impl">

<p>The <dfn
title="dom-DOMHTMLImplementation-createHTMLDocument"><code>createHTMLDocument(<var
title="">title</var>)</code></dfn> method, when invoked, must run the
following steps:</p>

<ol>

<li><p>Let <var title="">doc</var> be a newly created
<code>Document</code> object.</p></li>

<li><p>Mark <var title="">doc</var> as being an <span title="HTML
documents">HTML document</span>.</p></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>.</p></li>

<li><p>Create an <code>html</code> element, and append it to <var
title="">doc</var>.</p></li>

<li><p>Create a <code>head</code> element, and append it to the
<code>html</code> element created in the previous step.</p>

<li><p>Create a <code>title</code> element, and append it to the
<code>head</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>title</code> element created in the previous step.</p>

<li><p>Create a <code>body</code> element, and append it to the
<code>html</code> element created in the earlier step.</p>

<li><p>Return <var title="">doc</var>.</p></li>

</ol>

</div>


<div class="impl"> <!-- very deprecated API; use XHR instead -->

<h4>Loading XML documents</h4>
Expand Down

0 comments on commit 3f09c16

Please sign in to comment.