Skip to content
Permalink
Browse files

[e] (0) Move some of the quirky API requirements to DOM Core.

git-svn-id: http://svn.whatwg.org/webapps@6333 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Jul 27, 2011
1 parent 3f09c16 commit 60845c689fbd350210cfd3b501e389d82b1d5a35
Showing with 38 additions and 401 deletions.
  1. +19 −134 complete.html
  2. +19 −134 index
  3. +0 −133 source
<li><a href=#requirements-relating-to-bidirectional-algorithm-formatting-characters><span class=secno>3.2.6 </span>Requirements relating to bidirectional-algorithm formatting
characters</a></li>
<li><a href=#wai-aria><span class=secno>3.2.7 </span>WAI-ARIA</a></ol></li>
<li><a href=#apis-in-html-documents><span class=secno>3.3 </span>APIs in HTML documents</a></li>
<li><a href=#interactions-with-xpath-and-xslt><span class=secno>3.4 </span>Interactions with XPath and XSLT</a></li>
<li><a href=#dynamic-markup-insertion><span class=secno>3.5 </span>Dynamic markup insertion</a>
<li><a href=#interactions-with-xpath-and-xslt><span class=secno>3.3 </span>Interactions with XPath and XSLT</a></li>
<li><a href=#dynamic-markup-insertion><span class=secno>3.4 </span>Dynamic markup insertion</a>
<ol>
<li><a href=#opening-the-input-stream><span class=secno>3.5.1 </span>Opening the input stream</a></li>
<li><a href=#closing-the-input-stream><span class=secno>3.5.2 </span>Closing the input stream</a></li>
<li><a href=#document.write()><span class=secno>3.5.3 </span><code title=dom-document-write>document.write()</code></a></li>
<li><a href=#document.writeln()><span class=secno>3.5.4 </span><code title=dom-document-writeln>document.writeln()</code></a></li>
<li><a href=#innerhtml><span class=secno>3.5.5 </span><code title=dom-innerHTML>innerHTML</code></a></li>
<li><a href=#outerhtml><span class=secno>3.5.6 </span><code title=dom-outerHTML>outerHTML</code></a></li>
<li><a href=#insertadjacenthtml()><span class=secno>3.5.7 </span><code title=dom-insertAdjacentHTML>insertAdjacentHTML()</code></a></ol></ol></li>
<li><a href=#opening-the-input-stream><span class=secno>3.4.1 </span>Opening the input stream</a></li>
<li><a href=#closing-the-input-stream><span class=secno>3.4.2 </span>Closing the input stream</a></li>
<li><a href=#document.write()><span class=secno>3.4.3 </span><code title=dom-document-write>document.write()</code></a></li>
<li><a href=#document.writeln()><span class=secno>3.4.4 </span><code title=dom-document-writeln>document.writeln()</code></a></li>
<li><a href=#innerhtml><span class=secno>3.4.5 </span><code title=dom-innerHTML>innerHTML</code></a></li>
<li><a href=#outerhtml><span class=secno>3.4.6 </span><code title=dom-outerHTML>outerHTML</code></a></li>
<li><a href=#insertadjacenthtml()><span class=secno>3.4.7 </span><code title=dom-insertAdjacentHTML>insertAdjacentHTML()</code></a></ol></ol></li>
<li><a href=#semantics><span class=secno>4 </span>The elements of HTML</a>
<ol>
<li><a href=#the-root-element><span class=secno>4.1 </span>The root element</a>



<h3 id=apis-in-html-documents><span class=secno>3.3 </span>APIs in HTML documents</h3>

<p>For <a href=#html-documents>HTML documents</a>, and for <a href=#html-elements>HTML
elements</a> in <a href=#html-documents>HTML documents</a>, certain APIs defined
in DOM Core become case-insensitive or case-changing, as sometimes
defined in DOM Core, and as summarized <span class=impl>or
required</span> below. <a href=#refsDOMCORE>[DOMCORE]</a></p>

<p>This does not apply to <a href=#xml-documents>XML documents</a> or to elements
that are not in the <a href=#html-namespace-0>HTML namespace</a> despite being in
<a href=#html-documents>HTML documents</a>.</p>

<dl><dt><code title=dom-Element-tagName><a href=#dom-element-tagname>Element.tagName</a></code> and <code title=dom-Node-nodeName>Node.nodeName</code></dt>

<dd>

<p>These attributes <span class=impl>must</span> return element
names <a href=#converted-to-ascii-uppercase>converted to ASCII uppercase</a>, regardless of the case
with which they were created.</p>

</dd>


<dt><code title=dom-Document-createElement><a href=#dom-document-createelement>Document.createElement()</a></code></dt>

<dd>

<p>The canonical form of HTML markup is all-lowercase; thus, this
method will <a href=#converted-to-ascii-lowercase title="converted to ASCII lowercase">lowercase</a>
the argument before creating the requisite element. <span class=impl>Also, the element created must be in the <a href=#html-namespace-0>HTML
namespace</a></span>.</p>

<p class=note>This doesn't apply to <code title=dom-Document-createElementNS><a href=#dom-document-createelementns>Document.createElementNS()</a></code>.
Thus, it is possible, by passing this last method a tag name in
the wrong case, to create an element that appears to have the same
tag name as that of an element defined in this specification when
its <code title=dom-Element-tagName><a href=#dom-element-tagname>tagName</a></code> attribute is
examined, but that doesn't support the corresponding interfaces.
The "real" element name (unaffected by case conversions) can be
obtained from the <code title=dom-Node-localName><a href=#dom-node-localname>localName</a></code> attribute.</p>

</dd>


<dt><code title=dom-Element-setAttribute>Element.setAttribute()</code></dt>
<dt><code title=dom-Element-setAttributeNode>Element.setAttributeNode()</code></dt>

<dd>

<p>Attribute names are <a href=#converted-to-ascii-lowercase>converted to ASCII lowercase</a>.</p>

<div class=impl>

<p>Specifically: when an attribute is set on an <a href=#html-elements title="HTML
elements">HTML element</a> using <code title="">Element.setAttribute()</code>, the name argument must be
<a href=#converted-to-ascii-lowercase>converted to ASCII lowercase</a> before the element is
affected; and when an <code><a href=#attr>Attr</a></code> node is set on an <a href=#html-elements title="HTML elements">HTML element</a> using <code title="">Element.setAttributeNode()</code>, it must have its name
<a href=#converted-to-ascii-lowercase>converted to ASCII lowercase</a> before the element is
affected.</p>

</div>

<p class=note>This doesn't apply to <code title="">Element.setAttributeNS()</code> and <code title="">Element.setAttributeNodeNS()</code>.</p>

</dd>


<dt><code title=dom-Element-getAttribute>Element.getAttribute()</code></dt>
<dt><code title=dom-Element-getAttributeNode>Element.getAttributeNode()</code></dt>

<dd>

<p>Attribute names are <a href=#converted-to-ascii-lowercase>converted to ASCII lowercase</a>.</p>

<div class=impl>

<p>Specifically: When the <code title="">Element.getAttribute()</code> method or the <code title="">Element.getAttributeNode()</code> method is invoked on
an <a href=#html-elements title="HTML elements">HTML element</a>, the name
argument must be <a href=#converted-to-ascii-lowercase>converted to ASCII lowercase</a> before the
element's attributes are examined.</p>

</div>

<p class=note>This doesn't apply to <code title="">Element.getAttributeNS()</code> and <code title="">Element.getAttributeNodeNS()</code>.</p>

</dd>


<dt><code title=dom-Document-getElementsByTagName>Document.getElementsByTagName()</code></dt>
<dt><code title=dom-Element-getElementsByTagName>Element.getElementsByTagName()</code></dt>

<dd>

<p>HTML elements match by lower-casing the argument before
comparison, elements from other namespaces are treated as in XML
(case-sensitively).</p>

<div class=impl>

<p>Specifically, these methods (but not their namespaced
counterparts) must compare the given argument in a
<a href=#case-sensitive>case-sensitive</a> manner, but when looking at <a href=#html-elements title="HTML elements">HTML elements</a>, the argument must
first be <a href=#converted-to-ascii-lowercase>converted to ASCII lowercase</a>.</p>

</div>

<p class=note>Thus, in an <a href=#html-documents title="HTML documents">HTML
document</a> with nodes in multiple namespaces, these methods
will effectively be both case-sensitive and case-insensitive at
the same time.</p>

</dd>


</dl><div class=impl>
<div class=impl>

<h3 id=interactions-with-xpath-and-xslt><span class=secno>3.4 </span>Interactions with XPath and XSLT</h3>
<h3 id=interactions-with-xpath-and-xslt><span class=secno>3.3 </span>Interactions with XPath and XSLT</h3>

<p id=xpath-1.0-processors>Implementations of XPath 1.0 that
operate on <a href=#html-documents>HTML documents</a> parsed or created in the



<h3 id=dynamic-markup-insertion><span class=secno>3.5 </span><dfn>Dynamic markup insertion</dfn></h3>
<h3 id=dynamic-markup-insertion><span class=secno>3.4 </span><dfn>Dynamic markup insertion</dfn></h3>

<p class=note>APIs for dynamically inserting markup into the
document interact with the parser, and thus their behavior varies



<h4 id=opening-the-input-stream><span class=secno>3.5.1 </span>Opening the input stream</h4>
<h4 id=opening-the-input-stream><span class=secno>3.4.1 </span>Opening the input stream</h4>

<p>The <dfn id=dom-document-open title=dom-document-open><code>open()</code></dfn>
method comes in several variants with different numbers of



<h4 id=closing-the-input-stream><span class=secno>3.5.2 </span>Closing the input stream</h4>
<h4 id=closing-the-input-stream><span class=secno>3.4.2 </span>Closing the input stream</h4>

<dl class=domintro><dt><var title="">document</var> . <code title=dom-document-close><a href=#dom-document-close>close</a></code>()</dt>




<h4 id=document.write()><span class=secno>3.5.3 </span><code title=dom-document-write><a href=#dom-document-write>document.write()</a></code></h4>
<h4 id=document.write()><span class=secno>3.4.3 </span><code title=dom-document-write><a href=#dom-document-write>document.write()</a></code></h4>

<dl class=domintro><dt><var title="">document</var> . <code title=dom-document-write><a href=#dom-document-write>write</a></code>(<var title="">text</var>...)</dt>

</ol></div>


<h4 id=document.writeln()><span class=secno>3.5.4 </span><code title=dom-document-writeln><a href=#dom-document-writeln>document.writeln()</a></code></h4>
<h4 id=document.writeln()><span class=secno>3.4.4 </span><code title=dom-document-writeln><a href=#dom-document-writeln>document.writeln()</a></code></h4>

<dl class=domintro><dt><var title="">document</var> . <code title=dom-document-writeln><a href=#dom-document-writeln>writeln</a></code>(<var title="">text</var>...)</dt>




<h4 id=innerhtml><span class=secno>3.5.5 </span><code title=dom-innerHTML><a href=#dom-innerhtml>innerHTML</a></code></h4>
<h4 id=innerhtml><span class=secno>3.4.5 </span><code title=dom-innerHTML><a href=#dom-innerhtml>innerHTML</a></code></h4>

<p>The <dfn id=dom-innerhtml title=dom-innerHTML><code>innerHTML</code></dfn> IDL
attribute represents the markup of the node's contents.</p>



<h4 id=outerhtml><span class=secno>3.5.6 </span><code title=dom-outerHTML><a href=#dom-outerhtml>outerHTML</a></code></h4>
<h4 id=outerhtml><span class=secno>3.4.6 </span><code title=dom-outerHTML><a href=#dom-outerhtml>outerHTML</a></code></h4>

<p>The <dfn id=dom-outerhtml title=dom-outerHTML><code>outerHTML</code></dfn> IDL
attribute represents the markup of the element and its contents.</p>



<h4 id=insertadjacenthtml()><span class=secno>3.5.7 </span><code title=dom-insertAdjacentHTML><a href=#dom-insertadjacenthtml>insertAdjacentHTML()</a></code></h4>
<h4 id=insertadjacenthtml()><span class=secno>3.4.7 </span><code title=dom-insertAdjacentHTML><a href=#dom-insertadjacenthtml>insertAdjacentHTML()</a></code></h4>

<dl class=domintro><dt><var title="">element</var> . <code title=dom-insertAdjacentHTML><a href=#dom-insertadjacenthtml>insertAdjacentHTML</a></code>(<var title="">position</var>, <var title="">text</var>)</dt>

0 comments on commit 60845c6

Please sign in to comment.
You can’t perform that action at this time.