Commits

annevk committed d3fc2c5

use HTMLCollection for element collections exclusively. https://www.w3.org/Bugs/Public/show_bug.cgi?id=15609

Comments (0)

Files changed (3)

 <p>The
 <dfn id="concept-getelementsbytagname" title="concept-getElementsByTagName">list of elements with local name <var title="">localName</var></dfn>
 for a <a href="#concept-node" title="concept-node">node</a> <var title="">root</var> is the
-<code><a href="#nodelist">NodeList</a></code> returned by the following algorithm:
+<code><a href="#htmlcollection">HTMLCollection</a></code> returned by the following algorithm:
 <ol>
  <li><p>If <var title="">localName</var> is "<code>*</code>" (U+002A),
- return a <code><a href="#nodelist">NodeList</a></code> rooted at <var title="">root</var>,
+ return a <code><a href="#htmlcollection">HTMLCollection</a></code> rooted at <var title="">root</var>,
  whose filter matches only <a href="#concept-element" title="concept-element">elements</a>.
 
  <li>
   <p>Otherwise, if <var title="">root</var>'s
   <a href="#concept-node-document" title="concept-node-document">node document</a> is an
-  <a href="#html-document">HTML document</a>, return a <code><a href="#nodelist">NodeList</a></code> rooted at
-  <var title="">root</var>, whose filter matches only the following nodes:
+  <a href="#html-document">HTML document</a>, return a <code><a href="#htmlcollection">HTMLCollection</a></code> rooted at
+  <var title="">root</var>, whose filter matches only the following
+  <a href="#concept-element" title="concept-element">elements</a>:
 
   <ul>
-   <li><a href="#concept-element" title="concept-element">elements</a> in the
-   <a href="#html-namespace">HTML namespace</a> whose
+   <li>Whose <a href="#concept-element-namespace" title="concept-element-namespace">namespace</a> is the
+   <a href="#html-namespace">HTML namespace</a> and whose
    <a href="#concept-element-local-name" title="concept-element-local-name">local name</a> is
    <var title="">localName</var> <a href="#converted-to-ascii-lowercase">converted to ASCII lowercase</a>.
 
-   <li><a href="#concept-element" title="concept-element">elements</a>, <em>not</em> in the
-   <a href="#html-namespace">HTML namespace</a>, whose
+   <li>Whose <a href="#concept-element-namespace" title="concept-element-namespace">namespace</a> is
+   <em>not</em> the <a href="#html-namespace">HTML namespace</a> and whose
    <a href="#concept-element-local-name" title="concept-element-local-name">local name</a> is
    <var title="">localName</var>.
   </ul>
 
- <li><p>Otherwise, return a <code><a href="#nodelist">NodeList</a></code> rooted at
+ <li><p>Otherwise, return a <code><a href="#htmlcollection">HTMLCollection</a></code> rooted at
  <var title="">root</var>, whose filter matches only
  <a href="#concept-element" title="concept-element">elements</a> whose
  <a href="#concept-element-local-name" title="concept-element-local-name">local name</a> is
  <var title="">localName</var>.
 </ol>
-<p>When invoked with the same argument, the same <code><a href="#nodelist">NodeList</a></code>
+
+<p>When invoked with the same argument, the same <code><a href="#htmlcollection">HTMLCollection</a></code>
 object may be returned as returned by an earlier call.
 
 
 <p>The
 <dfn id="concept-getelementsbytagnamens" title="concept-getElementsByTagNameNS">list of elements with namespace <var title="">namespace</var> and local name <var title="">localName</var></dfn>
 for a <a href="#concept-node" title="concept-node">node</a> <var title="">root</var> is the
-<code><a href="#nodelist">NodeList</a></code> returned by the following algorithm:
+<code><a href="#htmlcollection">HTMLCollection</a></code> returned by the following algorithm:
 <ol>
  <li><p>If <var title="">namespace</var> is the empty string, set it to null.
 
  <li><p>If both <var title="">namespace</var> and <var title="">localName</var>
- are "<code>*</code>" (U+002A) return a <code><a href="#nodelist">NodeList</a></code> rooted at
+ are "<code>*</code>" (U+002A) return a <code><a href="#htmlcollection">HTMLCollection</a></code> rooted at
  <var title="">root</var>, whose filter matches only
  <a href="#concept-element" title="concept-element">elements</a>.
 
  <li><p>Otherwise, if just <var title="">namespace</var> is "<code>*</code>"
- (U+002A), return a <code><a href="#nodelist">NodeList</a></code> rooted at
+ (U+002A), return a <code><a href="#htmlcollection">HTMLCollection</a></code> rooted at
  <var title="">root</var>, whose filter matches only
  <a href="#concept-element" title="concept-element">elements</a> whose
  <a href="#concept-element-local-name" title="concept-element-local-name">local name</a> is
  <var title="">localName</var>.
 
  <li><p>Otherwise, if just <var title="">localName</var> is "<code>*</code>"
- (U+002A), return a <code><a href="#nodelist">NodeList</a></code> rooted at
+ (U+002A), return a <code><a href="#htmlcollection">HTMLCollection</a></code> rooted at
  <var title="">root</var>, whose filter matches only
  <a href="#concept-element" title="concept-element">elements</a> whose
  <a href="#concept-element-namespace" title="concept-element-namespace">namespace</a> is
  <var title="">namespace</var>.
 
- <li><p>Otherwise, return a <code><a href="#nodelist">NodeList</a></code> rooted at
+ <li><p>Otherwise, return a <code><a href="#htmlcollection">HTMLCollection</a></code> rooted at
  <var title="">root</var>, whose filter matches only
  <a href="#concept-element" title="concept-element">elements</a> whose
  <a href="#concept-element-namespace" title="concept-element-namespace">namespace</a> is
  <var title="">localName</var>.
 </ol>
 
-<p>When invoked with the same arguments, the same <code><a href="#nodelist">NodeList</a></code>
+<p>When invoked with the same arguments, the same <code><a href="#htmlcollection">HTMLCollection</a></code>
 object may be returned as returned by an earlier call.
 
 
 <p>The
 <dfn id="concept-getelementsbyclassname" title="concept-getElementsByClassName">list of elements with class names <var title="">classNames</var></dfn>
 for a <a href="#concept-node" title="concept-node">node</a> <var title="">root</var> is the
-<code><a href="#nodelist">NodeList</a></code> returned by the following algorithm:
+<code><a href="#htmlcollection">HTMLCollection</a></code> returned by the following algorithm:
 <ol>
  <li>
   <p>Let <var title="">classes</var> be the set of tokens found by
 
  <li>
   <p>If <var title="">classes</var> is the empty set, return an empty
-  <code><a href="#nodelist">NodeList</a></code> and terminate these steps.
+  <code><a href="#htmlcollection">HTMLCollection</a></code> and terminate these steps.
 
  <li>
-  <p>Return a <code><a href="#nodelist">NodeList</a></code> rooted at <var title="">root</var>,
+  <p>Return a <code><a href="#htmlcollection">HTMLCollection</a></code> rooted at <var title="">root</var>,
   whose filter matches only
   <a href="#concept-element" title="concept-element">elements</a> that have all the
   <a href="#concept-class" title="concept-class">classes</a> in <var title="">classes</var>.
   <a href="#ascii-case-insensitive">ASCII case-insensitive</a> manner, otherwise, the comparisons
   must be done in a <a href="#case-sensitive">case-sensitive</a> manner.
 </ol>
-<p>When invoked with the same argument, the same <code><a href="#nodelist">NodeList</a></code>
+<p>When invoked with the same argument, the same <code><a href="#htmlcollection">HTMLCollection</a></code>
 object may be returned as returned by an earlier call.
 
 
 
   readonly attribute <a href="#documenttype">DocumentType</a>? <a href="#dom-document-doctype" title="dom-Document-doctype">doctype</a>;
   readonly attribute <a href="#element">Element</a>? <a href="#dom-document-documentelement" title="dom-Document-documentElement">documentElement</a>;
-  <a href="#nodelist">NodeList</a> <a href="#dom-document-getelementsbytagname" title="dom-Document-getElementsByTagName">getElementsByTagName</a>(DOMString <var title="">qualifiedName</var>);
-  <a href="#nodelist">NodeList</a> <a href="#dom-document-getelementsbytagnamens" title="dom-Document-getElementsByTagNameNS">getElementsByTagNameNS</a>(DOMString? <var title="">namespace</var>, DOMString <var title="">localName</var>);
-  <a href="#nodelist">NodeList</a> <a href="#dom-document-getelementsbyclassname" title="dom-Document-getElementsByClassName">getElementsByClassName</a>(DOMString <var title="">classNames</var>);
+  <a href="#htmlcollection">HTMLCollection</a> <a href="#dom-document-getelementsbytagname" title="dom-Document-getElementsByTagName">getElementsByTagName</a>(DOMString <var title="">qualifiedName</var>);
+  <a href="#htmlcollection">HTMLCollection</a> <a href="#dom-document-getelementsbytagnamens" title="dom-Document-getElementsByTagNameNS">getElementsByTagNameNS</a>(DOMString? <var title="">namespace</var>, DOMString <var title="">localName</var>);
+  <a href="#htmlcollection">HTMLCollection</a> <a href="#dom-document-getelementsbyclassname" title="dom-Document-getElementsByClassName">getElementsByClassName</a>(DOMString <var title="">classNames</var>);
   <a href="#element">Element</a>? <a href="#dom-document-getelementbyid" title="dom-Document-getElementById">getElementById</a>(DOMString <var title="">elementId</var>);
 
   <a href="#element">Element</a> <a href="#dom-document-createelement" title="dom-Document-createElement">createElement</a>(DOMString <var title="">localName</var>);
 
  <dd>
   <p>If <var>localName</var> is "<code title="">*</code>" returns a
-  <code><a href="#nodelist">NodeList</a></code> of all
+  <code><a href="#htmlcollection">HTMLCollection</a></code> of all
   <a href="#concept-tree-descendant" title="concept-tree-descendant">descendant</a>
   <a href="#concept-element" title="concept-element">elements</a>.
 
-  <p>Otherwise, returns a <code><a href="#nodelist">NodeList</a></code> of all
+  <p>Otherwise, returns a <code><a href="#htmlcollection">HTMLCollection</a></code> of all
   <a href="#concept-tree-descendant" title="concept-tree-descendant">descendant</a>
   <a href="#concept-element" title="concept-element">elements</a> whose
   <a href="#concept-element-local-name" title="concept-element-local-name">local name</a> is
 
  <dd>
   <p>If <var>namespace</var> and <var>localName</var> are
-  "<code title="">*</code>" returns a <code><a href="#nodelist">NodeList</a></code> of all
+  "<code title="">*</code>" returns a <code><a href="#htmlcollection">HTMLCollection</a></code> of all
   <a href="#concept-tree-descendant" title="concept-tree-descendant">descendant</a>
   <a href="#concept-element" title="concept-element">elements</a>.
 
   <p>If only <var>namespace</var> is "<code title="">*</code>" returns a
-  <code><a href="#nodelist">NodeList</a></code> of all
+  <code><a href="#htmlcollection">HTMLCollection</a></code> of all
   <a href="#concept-tree-descendant" title="concept-tree-descendant">descendant</a>
   <a href="#concept-element" title="concept-element">elements</a> whose
   <a href="#concept-element-local-name" title="concept-element-local-name">local name</a> is
   <var title="">localName</var>.
 
   <p>If only <var>localName</var> is "<code title="">*</code>" returns a
-  <code><a href="#nodelist">NodeList</a></code> of all
+  <code><a href="#htmlcollection">HTMLCollection</a></code> of all
   <a href="#concept-tree-descendant" title="concept-tree-descendant">descendant</a>
   <a href="#concept-element" title="concept-element">elements</a> whose
   <a href="#concept-element-namespace" title="concept-element-namespace">namespace</a> is
   <var title="">namespace</var>.
 
-  <p>Otherwise, returns a <code><a href="#nodelist">NodeList</a></code> of all
+  <p>Otherwise, returns a <code><a href="#htmlcollection">HTMLCollection</a></code> of all
   <a href="#concept-tree-descendant" title="concept-tree-descendant">descendant</a>
   <a href="#concept-element" title="concept-element">elements</a> whose
   <a href="#concept-element-namespace" title="concept-element-namespace">namespace</a> is
  <dt><var title="">collection</var> = <var title="">document</var> . <code title="dom-Document-getElementsByClassName"><a href="#dom-document-getelementsbyclassname">getElementsByClassName(<var>classes</var>)</a></code>
  <dt><var title="">collection</var> = <var title="">element</var> . <code title="dom-Element-getElementsByClassName"><a href="#dom-element-getelementsbyclassname">getElementsByClassName(<var>classes</var>)</a></code>
  <dd>
-  <p>Returns a <code><a href="#nodelist">NodeList</a></code> of the
+  <p>Returns a <code><a href="#htmlcollection">HTMLCollection</a></code> of the
   <a href="#concept-element" title="concept-element">elements</a> in the object on which
   the method was invoked (a <a href="#concept-document" title="concept-document">document</a> or
   an <a href="#concept-element" title="concept-element">element</a>) that have all the classes
 
  <p>A call to
  <code title="">document.getElementById('example').getElementsByClassName('aaa')</code>
- would return a <code><a href="#nodelist">NodeList</a></code> with the two paragraphs
+ would return a <code><a href="#htmlcollection">HTMLCollection</a></code> with the two paragraphs
  <code title="">p1</code> and <code title="">p2</code> in it.
 
  <p>A call to
   <span>Attr</span> <span title=dom-Element-setAttributeNode>setAttributeNode</span>(Attr newAttr);
   <span>Attr</span> <span title=dom-Element-removeAttributeNode>removeAttributeNode</span>(Attr oldAttr);
 -->
-  <a href="#nodelist">NodeList</a> <a href="#dom-element-getelementsbytagname" title="dom-Element-getElementsByTagName">getElementsByTagName</a>(DOMString <var title="">qualifiedName</var>);
-  <a href="#nodelist">NodeList</a> <a href="#dom-element-getelementsbytagnamens" title="dom-Element-getElementsByTagNameNS">getElementsByTagNameNS</a>(DOMString? <var title="">namespace</var>, DOMString <var title="">localName</var>);
-  <a href="#nodelist">NodeList</a> <a href="#dom-element-getelementsbyclassname" title="dom-Element-getElementsByClassName">getElementsByClassName</a>(DOMString <var title="">classNames</var>);
+  <a href="#htmlcollection">HTMLCollection</a> <a href="#dom-element-getelementsbytagname" title="dom-Element-getElementsByTagName">getElementsByTagName</a>(DOMString <var title="">qualifiedName</var>);
+  <a href="#htmlcollection">HTMLCollection</a> <a href="#dom-element-getelementsbytagnamens" title="dom-Element-getElementsByTagNameNS">getElementsByTagNameNS</a>(DOMString? <var title="">namespace</var>, DOMString <var title="">localName</var>);
+  <a href="#htmlcollection">HTMLCollection</a> <a href="#dom-element-getelementsbyclassname" title="dom-Element-getElementsByClassName">getElementsByClassName</a>(DOMString <var title="">classNames</var>);
 
   readonly attribute <a href="#htmlcollection">HTMLCollection</a> <a href="#dom-element-children" title="dom-Element-children">children</a>;
   readonly attribute <a href="#element">Element</a>? <a href="#dom-element-firstelementchild" title="dom-Element-firstElementChild">firstElementChild</a>;

Overview.src.html

 <p>The
 <dfn title=concept-getElementsByTagName>list of elements with local name <var title>localName</var></dfn>
 for a <span title=concept-node>node</span> <var title>root</var> is the
-<code>NodeList</code> returned by the following algorithm:
+<code>HTMLCollection</code> returned by the following algorithm:
 <ol>
  <li><p>If <var title>localName</var> is "<code>*</code>" (U+002A),
- return a <code>NodeList</code> rooted at <var title>root</var>,
+ return a <code>HTMLCollection</code> rooted at <var title>root</var>,
  whose filter matches only <span title=concept-element>elements</span>.
 
  <li>
   <p>Otherwise, if <var title>root</var>'s
   <span title=concept-node-document>node document</span> is an
-  <span>HTML document</span>, return a <code>NodeList</code> rooted at
-  <var title>root</var>, whose filter matches only the following nodes:
+  <span>HTML document</span>, return a <code>HTMLCollection</code> rooted at
+  <var title>root</var>, whose filter matches only the following
+  <span title=concept-element>elements</span>:
 
   <ul>
-   <li><span title=concept-element>elements</span> in the
-   <span>HTML namespace</span> whose
+   <li>Whose <span title=concept-element-namespace>namespace</span> is the
+   <span>HTML namespace</span> and whose
    <span title=concept-element-local-name>local name</span> is
    <var title>localName</var> <span>converted to ASCII lowercase</span>.
 
-   <li><span title=concept-element>elements</span>, <em>not</em> in the
-   <span>HTML namespace</span>, whose
+   <li>Whose <span title=concept-element-namespace>namespace</span> is
+   <em>not</em> the <span>HTML namespace</span> and whose
    <span title=concept-element-local-name>local name</span> is
    <var title>localName</var>.
   </ul>
 
- <li><p>Otherwise, return a <code>NodeList</code> rooted at
+ <li><p>Otherwise, return a <code>HTMLCollection</code> rooted at
  <var title>root</var>, whose filter matches only
  <span title=concept-element>elements</span> whose
  <span title=concept-element-local-name>local name</span> is
  <var title>localName</var>.
 </ol>
-<p>When invoked with the same argument, the same <code>NodeList</code>
+
+<p>When invoked with the same argument, the same <code>HTMLCollection</code>
 object may be returned as returned by an earlier call.
 
 
 <p>The
 <dfn title=concept-getElementsByTagNameNS>list of elements with namespace <var title>namespace</var> and local name <var title>localName</var></dfn>
 for a <span title=concept-node>node</span> <var title>root</var> is the
-<code>NodeList</code> returned by the following algorithm:
+<code>HTMLCollection</code> returned by the following algorithm:
 <ol>
  <li><p>If <var title>namespace</var> is the empty string, set it to null.
 
  <li><p>If both <var title>namespace</var> and <var title>localName</var>
- are "<code>*</code>" (U+002A) return a <code>NodeList</code> rooted at
+ are "<code>*</code>" (U+002A) return a <code>HTMLCollection</code> rooted at
  <var title>root</var>, whose filter matches only
  <span title=concept-element>elements</span>.
 
  <li><p>Otherwise, if just <var title>namespace</var> is "<code>*</code>"
- (U+002A), return a <code>NodeList</code> rooted at
+ (U+002A), return a <code>HTMLCollection</code> rooted at
  <var title>root</var>, whose filter matches only
  <span title=concept-element>elements</span> whose
  <span title=concept-element-local-name>local name</span> is
  <var title>localName</var>.
 
  <li><p>Otherwise, if just <var title>localName</var> is "<code>*</code>"
- (U+002A), return a <code>NodeList</code> rooted at
+ (U+002A), return a <code>HTMLCollection</code> rooted at
  <var title>root</var>, whose filter matches only
  <span title=concept-element>elements</span> whose
  <span title=concept-element-namespace>namespace</span> is
  <var title>namespace</var>.
 
- <li><p>Otherwise, return a <code>NodeList</code> rooted at
+ <li><p>Otherwise, return a <code>HTMLCollection</code> rooted at
  <var title>root</var>, whose filter matches only
  <span title=concept-element>elements</span> whose
  <span title=concept-element-namespace>namespace</span> is
  <var title>localName</var>.
 </ol>
 
-<p>When invoked with the same arguments, the same <code>NodeList</code>
+<p>When invoked with the same arguments, the same <code>HTMLCollection</code>
 object may be returned as returned by an earlier call.
 
 
 <p>The
 <dfn title=concept-getElementsByClassName>list of elements with class names <var title>classNames</var></dfn>
 for a <span title=concept-node>node</span> <var title>root</var> is the
-<code>NodeList</code> returned by the following algorithm:
+<code>HTMLCollection</code> returned by the following algorithm:
 <ol>
  <li>
   <p>Let <var title>classes</var> be the set of tokens found by
 
  <li>
   <p>If <var title>classes</var> is the empty set, return an empty
-  <code>NodeList</code> and terminate these steps.
+  <code>HTMLCollection</code> and terminate these steps.
 
  <li>
-  <p>Return a <code>NodeList</code> rooted at <var title>root</var>,
+  <p>Return a <code>HTMLCollection</code> rooted at <var title>root</var>,
   whose filter matches only
   <span title=concept-element>elements</span> that have all the
   <span title=concept-class>classes</span> in <var title>classes</var>.
   <span>ASCII case-insensitive</span> manner, otherwise, the comparisons
   must be done in a <span>case-sensitive</span> manner.
 </ol>
-<p>When invoked with the same argument, the same <code>NodeList</code>
+<p>When invoked with the same argument, the same <code>HTMLCollection</code>
 object may be returned as returned by an earlier call.
 
 
 
   readonly attribute <span>DocumentType</span>? <span title=dom-Document-doctype>doctype</span>;
   readonly attribute <span>Element</span>? <span title=dom-Document-documentElement>documentElement</span>;
-  <span>NodeList</span> <span title=dom-Document-getElementsByTagName>getElementsByTagName</span>(DOMString <var title>qualifiedName</var>);
-  <span>NodeList</span> <span title=dom-Document-getElementsByTagNameNS>getElementsByTagNameNS</span>(DOMString? <var title>namespace</var>, DOMString <var title>localName</var>);
-  <span>NodeList</span> <span title=dom-Document-getElementsByClassName>getElementsByClassName</span>(DOMString <var title>classNames</var>);
+  <span>HTMLCollection</span> <span title=dom-Document-getElementsByTagName>getElementsByTagName</span>(DOMString <var title>qualifiedName</var>);
+  <span>HTMLCollection</span> <span title=dom-Document-getElementsByTagNameNS>getElementsByTagNameNS</span>(DOMString? <var title>namespace</var>, DOMString <var title>localName</var>);
+  <span>HTMLCollection</span> <span title=dom-Document-getElementsByClassName>getElementsByClassName</span>(DOMString <var title>classNames</var>);
   <span>Element</span>? <span title=dom-Document-getElementById>getElementById</span>(DOMString <var title>elementId</var>);
 
   <span>Element</span> <span title=dom-Document-createElement>createElement</span>(DOMString <var title>localName</var>);
 
  <dd>
   <p>If <var>localName</var> is "<code title>*</code>" returns a
-  <code>NodeList</code> of all
+  <code>HTMLCollection</code> of all
   <span title=concept-tree-descendant>descendant</span>
   <span title=concept-element>elements</span>.
 
-  <p>Otherwise, returns a <code>NodeList</code> of all
+  <p>Otherwise, returns a <code>HTMLCollection</code> of all
   <span title=concept-tree-descendant>descendant</span>
   <span title=concept-element>elements</span> whose
   <span title=concept-element-local-name>local name</span> is
 
  <dd>
   <p>If <var>namespace</var> and <var>localName</var> are
-  "<code title>*</code>" returns a <code>NodeList</code> of all
+  "<code title>*</code>" returns a <code>HTMLCollection</code> of all
   <span title=concept-tree-descendant>descendant</span>
   <span title=concept-element>elements</span>.
 
   <p>If only <var>namespace</var> is "<code title>*</code>" returns a
-  <code>NodeList</code> of all
+  <code>HTMLCollection</code> of all
   <span title=concept-tree-descendant>descendant</span>
   <span title=concept-element>elements</span> whose
   <span title=concept-element-local-name>local name</span> is
   <var title>localName</var>.
 
   <p>If only <var>localName</var> is "<code title>*</code>" returns a
-  <code>NodeList</code> of all
+  <code>HTMLCollection</code> of all
   <span title=concept-tree-descendant>descendant</span>
   <span title=concept-element>elements</span> whose
   <span title=concept-element-namespace>namespace</span> is
   <var title>namespace</var>.
 
-  <p>Otherwise, returns a <code>NodeList</code> of all
+  <p>Otherwise, returns a <code>HTMLCollection</code> of all
   <span title=concept-tree-descendant>descendant</span>
   <span title=concept-element>elements</span> whose
   <span title=concept-element-namespace>namespace</span> is
  <dt><var title>collection</var> = <var title>document</var> . <code title=dom-Document-getElementsByClassName>getElementsByClassName(<var>classes</var>)</code>
  <dt><var title>collection</var> = <var title>element</var> . <code title=dom-Element-getElementsByClassName>getElementsByClassName(<var>classes</var>)</code>
  <dd>
-  <p>Returns a <code>NodeList</code> of the
+  <p>Returns a <code>HTMLCollection</code> of the
   <span title=concept-element>elements</span> in the object on which
   the method was invoked (a <span title=concept-document>document</span> or
   an <span title=concept-element>element</span>) that have all the classes
 
  <p>A call to
  <code title>document.getElementById('example').getElementsByClassName('aaa')</code>
- would return a <code>NodeList</code> with the two paragraphs
+ would return a <code>HTMLCollection</code> with the two paragraphs
  <code title>p1</code> and <code title>p2</code> in it.
 
  <p>A call to
   <span>Attr</span> <span title=dom-Element-setAttributeNode>setAttributeNode</span>(Attr newAttr);
   <span>Attr</span> <span title=dom-Element-removeAttributeNode>removeAttributeNode</span>(Attr oldAttr);
 -->
-  <span>NodeList</span> <span title=dom-Element-getElementsByTagName>getElementsByTagName</span>(DOMString <var title>qualifiedName</var>);
-  <span>NodeList</span> <span title=dom-Element-getElementsByTagNameNS>getElementsByTagNameNS</span>(DOMString? <var title>namespace</var>, DOMString <var title>localName</var>);
-  <span>NodeList</span> <span title=dom-Element-getElementsByClassName>getElementsByClassName</span>(DOMString <var title>classNames</var>);
+  <span>HTMLCollection</span> <span title=dom-Element-getElementsByTagName>getElementsByTagName</span>(DOMString <var title>qualifiedName</var>);
+  <span>HTMLCollection</span> <span title=dom-Element-getElementsByTagNameNS>getElementsByTagNameNS</span>(DOMString? <var title>namespace</var>, DOMString <var title>localName</var>);
+  <span>HTMLCollection</span> <span title=dom-Element-getElementsByClassName>getElementsByClassName</span>(DOMString <var title>classNames</var>);
 
   readonly attribute <span>HTMLCollection</span> <span title=dom-Element-children>children</span>;
   readonly attribute <span>Element</span>? <span title=dom-Element-firstElementChild>firstElementChild</span>;
 <p>The
 <dfn id="concept-getelementsbytagname" title="concept-getElementsByTagName">list of elements with local name <var title="">localName</var></dfn>
 for a <a href="#concept-node" title="concept-node">node</a> <var title="">root</var> is the
-<code><a href="#nodelist">NodeList</a></code> returned by the following algorithm:
+<code><a href="#htmlcollection">HTMLCollection</a></code> returned by the following algorithm:
 <ol>
  <li><p>If <var title="">localName</var> is "<code>*</code>" (U+002A),
- return a <code><a href="#nodelist">NodeList</a></code> rooted at <var title="">root</var>,
+ return a <code><a href="#htmlcollection">HTMLCollection</a></code> rooted at <var title="">root</var>,
  whose filter matches only <a href="#concept-element" title="concept-element">elements</a>.
 
  <li>
   <p>Otherwise, if <var title="">root</var>'s
   <a href="#concept-node-document" title="concept-node-document">node document</a> is an
-  <a href="#html-document">HTML document</a>, return a <code><a href="#nodelist">NodeList</a></code> rooted at
-  <var title="">root</var>, whose filter matches only the following nodes:
+  <a href="#html-document">HTML document</a>, return a <code><a href="#htmlcollection">HTMLCollection</a></code> rooted at
+  <var title="">root</var>, whose filter matches only the following
+  <a href="#concept-element" title="concept-element">elements</a>:
 
   <ul>
-   <li><a href="#concept-element" title="concept-element">elements</a> in the
-   <a href="#html-namespace">HTML namespace</a> whose
+   <li>Whose <a href="#concept-element-namespace" title="concept-element-namespace">namespace</a> is the
+   <a href="#html-namespace">HTML namespace</a> and whose
    <a href="#concept-element-local-name" title="concept-element-local-name">local name</a> is
    <var title="">localName</var> <a href="#converted-to-ascii-lowercase">converted to ASCII lowercase</a>.
 
-   <li><a href="#concept-element" title="concept-element">elements</a>, <em>not</em> in the
-   <a href="#html-namespace">HTML namespace</a>, whose
+   <li>Whose <a href="#concept-element-namespace" title="concept-element-namespace">namespace</a> is
+   <em>not</em> the <a href="#html-namespace">HTML namespace</a> and whose
    <a href="#concept-element-local-name" title="concept-element-local-name">local name</a> is
    <var title="">localName</var>.
   </ul>
 
- <li><p>Otherwise, return a <code><a href="#nodelist">NodeList</a></code> rooted at
+ <li><p>Otherwise, return a <code><a href="#htmlcollection">HTMLCollection</a></code> rooted at
  <var title="">root</var>, whose filter matches only
  <a href="#concept-element" title="concept-element">elements</a> whose
  <a href="#concept-element-local-name" title="concept-element-local-name">local name</a> is
  <var title="">localName</var>.
 </ol>
-<p>When invoked with the same argument, the same <code><a href="#nodelist">NodeList</a></code>
+
+<p>When invoked with the same argument, the same <code><a href="#htmlcollection">HTMLCollection</a></code>
 object may be returned as returned by an earlier call.
 
 
 <p>The
 <dfn id="concept-getelementsbytagnamens" title="concept-getElementsByTagNameNS">list of elements with namespace <var title="">namespace</var> and local name <var title="">localName</var></dfn>
 for a <a href="#concept-node" title="concept-node">node</a> <var title="">root</var> is the
-<code><a href="#nodelist">NodeList</a></code> returned by the following algorithm:
+<code><a href="#htmlcollection">HTMLCollection</a></code> returned by the following algorithm:
 <ol>
  <li><p>If <var title="">namespace</var> is the empty string, set it to null.
 
  <li><p>If both <var title="">namespace</var> and <var title="">localName</var>
- are "<code>*</code>" (U+002A) return a <code><a href="#nodelist">NodeList</a></code> rooted at
+ are "<code>*</code>" (U+002A) return a <code><a href="#htmlcollection">HTMLCollection</a></code> rooted at
  <var title="">root</var>, whose filter matches only
  <a href="#concept-element" title="concept-element">elements</a>.
 
  <li><p>Otherwise, if just <var title="">namespace</var> is "<code>*</code>"
- (U+002A), return a <code><a href="#nodelist">NodeList</a></code> rooted at
+ (U+002A), return a <code><a href="#htmlcollection">HTMLCollection</a></code> rooted at
  <var title="">root</var>, whose filter matches only
  <a href="#concept-element" title="concept-element">elements</a> whose
  <a href="#concept-element-local-name" title="concept-element-local-name">local name</a> is
  <var title="">localName</var>.
 
  <li><p>Otherwise, if just <var title="">localName</var> is "<code>*</code>"
- (U+002A), return a <code><a href="#nodelist">NodeList</a></code> rooted at
+ (U+002A), return a <code><a href="#htmlcollection">HTMLCollection</a></code> rooted at
  <var title="">root</var>, whose filter matches only
  <a href="#concept-element" title="concept-element">elements</a> whose
  <a href="#concept-element-namespace" title="concept-element-namespace">namespace</a> is
  <var title="">namespace</var>.
 
- <li><p>Otherwise, return a <code><a href="#nodelist">NodeList</a></code> rooted at
+ <li><p>Otherwise, return a <code><a href="#htmlcollection">HTMLCollection</a></code> rooted at
  <var title="">root</var>, whose filter matches only
  <a href="#concept-element" title="concept-element">elements</a> whose
  <a href="#concept-element-namespace" title="concept-element-namespace">namespace</a> is
  <var title="">localName</var>.
 </ol>
 
-<p>When invoked with the same arguments, the same <code><a href="#nodelist">NodeList</a></code>
+<p>When invoked with the same arguments, the same <code><a href="#htmlcollection">HTMLCollection</a></code>
 object may be returned as returned by an earlier call.
 
 
 <p>The
 <dfn id="concept-getelementsbyclassname" title="concept-getElementsByClassName">list of elements with class names <var title="">classNames</var></dfn>
 for a <a href="#concept-node" title="concept-node">node</a> <var title="">root</var> is the
-<code><a href="#nodelist">NodeList</a></code> returned by the following algorithm:
+<code><a href="#htmlcollection">HTMLCollection</a></code> returned by the following algorithm:
 <ol>
  <li>
   <p>Let <var title="">classes</var> be the set of tokens found by
 
  <li>
   <p>If <var title="">classes</var> is the empty set, return an empty
-  <code><a href="#nodelist">NodeList</a></code> and terminate these steps.
+  <code><a href="#htmlcollection">HTMLCollection</a></code> and terminate these steps.
 
  <li>
-  <p>Return a <code><a href="#nodelist">NodeList</a></code> rooted at <var title="">root</var>,
+  <p>Return a <code><a href="#htmlcollection">HTMLCollection</a></code> rooted at <var title="">root</var>,
   whose filter matches only
   <a href="#concept-element" title="concept-element">elements</a> that have all the
   <a href="#concept-class" title="concept-class">classes</a> in <var title="">classes</var>.
   <a href="#ascii-case-insensitive">ASCII case-insensitive</a> manner, otherwise, the comparisons
   must be done in a <a href="#case-sensitive">case-sensitive</a> manner.
 </ol>
-<p>When invoked with the same argument, the same <code><a href="#nodelist">NodeList</a></code>
+<p>When invoked with the same argument, the same <code><a href="#htmlcollection">HTMLCollection</a></code>
 object may be returned as returned by an earlier call.
 
 
 
   readonly attribute <a href="#documenttype">DocumentType</a>? <a href="#dom-document-doctype" title="dom-Document-doctype">doctype</a>;
   readonly attribute <a href="#element">Element</a>? <a href="#dom-document-documentelement" title="dom-Document-documentElement">documentElement</a>;
-  <a href="#nodelist">NodeList</a> <a href="#dom-document-getelementsbytagname" title="dom-Document-getElementsByTagName">getElementsByTagName</a>(DOMString <var title="">qualifiedName</var>);
-  <a href="#nodelist">NodeList</a> <a href="#dom-document-getelementsbytagnamens" title="dom-Document-getElementsByTagNameNS">getElementsByTagNameNS</a>(DOMString? <var title="">namespace</var>, DOMString <var title="">localName</var>);
-  <a href="#nodelist">NodeList</a> <a href="#dom-document-getelementsbyclassname" title="dom-Document-getElementsByClassName">getElementsByClassName</a>(DOMString <var title="">classNames</var>);
+  <a href="#htmlcollection">HTMLCollection</a> <a href="#dom-document-getelementsbytagname" title="dom-Document-getElementsByTagName">getElementsByTagName</a>(DOMString <var title="">qualifiedName</var>);
+  <a href="#htmlcollection">HTMLCollection</a> <a href="#dom-document-getelementsbytagnamens" title="dom-Document-getElementsByTagNameNS">getElementsByTagNameNS</a>(DOMString? <var title="">namespace</var>, DOMString <var title="">localName</var>);
+  <a href="#htmlcollection">HTMLCollection</a> <a href="#dom-document-getelementsbyclassname" title="dom-Document-getElementsByClassName">getElementsByClassName</a>(DOMString <var title="">classNames</var>);
   <a href="#element">Element</a>? <a href="#dom-document-getelementbyid" title="dom-Document-getElementById">getElementById</a>(DOMString <var title="">elementId</var>);
 
   <a href="#element">Element</a> <a href="#dom-document-createelement" title="dom-Document-createElement">createElement</a>(DOMString <var title="">localName</var>);
 
  <dd>
   <p>If <var>localName</var> is "<code title="">*</code>" returns a
-  <code><a href="#nodelist">NodeList</a></code> of all
+  <code><a href="#htmlcollection">HTMLCollection</a></code> of all
   <a href="#concept-tree-descendant" title="concept-tree-descendant">descendant</a>
   <a href="#concept-element" title="concept-element">elements</a>.
 
-  <p>Otherwise, returns a <code><a href="#nodelist">NodeList</a></code> of all
+  <p>Otherwise, returns a <code><a href="#htmlcollection">HTMLCollection</a></code> of all
   <a href="#concept-tree-descendant" title="concept-tree-descendant">descendant</a>
   <a href="#concept-element" title="concept-element">elements</a> whose
   <a href="#concept-element-local-name" title="concept-element-local-name">local name</a> is
 
  <dd>
   <p>If <var>namespace</var> and <var>localName</var> are
-  "<code title="">*</code>" returns a <code><a href="#nodelist">NodeList</a></code> of all
+  "<code title="">*</code>" returns a <code><a href="#htmlcollection">HTMLCollection</a></code> of all
   <a href="#concept-tree-descendant" title="concept-tree-descendant">descendant</a>
   <a href="#concept-element" title="concept-element">elements</a>.
 
   <p>If only <var>namespace</var> is "<code title="">*</code>" returns a
-  <code><a href="#nodelist">NodeList</a></code> of all
+  <code><a href="#htmlcollection">HTMLCollection</a></code> of all
   <a href="#concept-tree-descendant" title="concept-tree-descendant">descendant</a>
   <a href="#concept-element" title="concept-element">elements</a> whose
   <a href="#concept-element-local-name" title="concept-element-local-name">local name</a> is
   <var title="">localName</var>.
 
   <p>If only <var>localName</var> is "<code title="">*</code>" returns a
-  <code><a href="#nodelist">NodeList</a></code> of all
+  <code><a href="#htmlcollection">HTMLCollection</a></code> of all
   <a href="#concept-tree-descendant" title="concept-tree-descendant">descendant</a>
   <a href="#concept-element" title="concept-element">elements</a> whose
   <a href="#concept-element-namespace" title="concept-element-namespace">namespace</a> is
   <var title="">namespace</var>.
 
-  <p>Otherwise, returns a <code><a href="#nodelist">NodeList</a></code> of all
+  <p>Otherwise, returns a <code><a href="#htmlcollection">HTMLCollection</a></code> of all
   <a href="#concept-tree-descendant" title="concept-tree-descendant">descendant</a>
   <a href="#concept-element" title="concept-element">elements</a> whose
   <a href="#concept-element-namespace" title="concept-element-namespace">namespace</a> is
  <dt><var title="">collection</var> = <var title="">document</var> . <code title="dom-Document-getElementsByClassName"><a href="#dom-document-getelementsbyclassname">getElementsByClassName(<var>classes</var>)</a></code>
  <dt><var title="">collection</var> = <var title="">element</var> . <code title="dom-Element-getElementsByClassName"><a href="#dom-element-getelementsbyclassname">getElementsByClassName(<var>classes</var>)</a></code>
  <dd>
-  <p>Returns a <code><a href="#nodelist">NodeList</a></code> of the
+  <p>Returns a <code><a href="#htmlcollection">HTMLCollection</a></code> of the
   <a href="#concept-element" title="concept-element">elements</a> in the object on which
   the method was invoked (a <a href="#concept-document" title="concept-document">document</a> or
   an <a href="#concept-element" title="concept-element">element</a>) that have all the classes
 
  <p>A call to
  <code title="">document.getElementById('example').getElementsByClassName('aaa')</code>
- would return a <code><a href="#nodelist">NodeList</a></code> with the two paragraphs
+ would return a <code><a href="#htmlcollection">HTMLCollection</a></code> with the two paragraphs
  <code title="">p1</code> and <code title="">p2</code> in it.
 
  <p>A call to
   <span>Attr</span> <span title=dom-Element-setAttributeNode>setAttributeNode</span>(Attr newAttr);
   <span>Attr</span> <span title=dom-Element-removeAttributeNode>removeAttributeNode</span>(Attr oldAttr);
 -->
-  <a href="#nodelist">NodeList</a> <a href="#dom-element-getelementsbytagname" title="dom-Element-getElementsByTagName">getElementsByTagName</a>(DOMString <var title="">qualifiedName</var>);
-  <a href="#nodelist">NodeList</a> <a href="#dom-element-getelementsbytagnamens" title="dom-Element-getElementsByTagNameNS">getElementsByTagNameNS</a>(DOMString? <var title="">namespace</var>, DOMString <var title="">localName</var>);
-  <a href="#nodelist">NodeList</a> <a href="#dom-element-getelementsbyclassname" title="dom-Element-getElementsByClassName">getElementsByClassName</a>(DOMString <var title="">classNames</var>);
+  <a href="#htmlcollection">HTMLCollection</a> <a href="#dom-element-getelementsbytagname" title="dom-Element-getElementsByTagName">getElementsByTagName</a>(DOMString <var title="">qualifiedName</var>);
+  <a href="#htmlcollection">HTMLCollection</a> <a href="#dom-element-getelementsbytagnamens" title="dom-Element-getElementsByTagNameNS">getElementsByTagNameNS</a>(DOMString? <var title="">namespace</var>, DOMString <var title="">localName</var>);
+  <a href="#htmlcollection">HTMLCollection</a> <a href="#dom-element-getelementsbyclassname" title="dom-Element-getElementsByClassName">getElementsByClassName</a>(DOMString <var title="">classNames</var>);
 
   readonly attribute <a href="#htmlcollection">HTMLCollection</a> <a href="#dom-element-children" title="dom-Element-children">children</a>;
   readonly attribute <a href="#element">Element</a>? <a href="#dom-element-firstelementchild" title="dom-Element-firstElementChild">firstElementChild</a>;