[html5] r6327 - [e] (0) Move HTMLCollection to DOM Core

whatwg at whatwg.org whatwg at whatwg.org
Tue Jul 26 16:32:36 PDT 2011


Author: ianh
Date: 2011-07-26 16:32:35 -0700 (Tue, 26 Jul 2011)
New Revision: 6327

Modified:
   complete.html
   index
   source
Log:
[e] (0) Move HTMLCollection to DOM Core

Modified: complete.html
===================================================================
--- complete.html	2011-07-26 17:42:26 UTC (rev 6326)
+++ complete.html	2011-07-26 23:32:35 UTC (rev 6327)
@@ -370,11 +370,10 @@
      <li><a href=#reflecting-content-attributes-in-idl-attributes><span class=secno>2.8.1 </span>Reflecting content attributes in IDL attributes</a></li>
      <li><a href=#collections-0><span class=secno>2.8.2 </span>Collections</a>
       <ol>
-       <li><a href=#htmlcollection-0><span class=secno>2.8.2.1 </span>HTMLCollection</a></li>
-       <li><a href=#htmlallcollection-0><span class=secno>2.8.2.2 </span>HTMLAllCollection</a></li>
-       <li><a href=#htmlformcontrolscollection-0><span class=secno>2.8.2.3 </span>HTMLFormControlsCollection</a></li>
-       <li><a href=#htmloptionscollection-0><span class=secno>2.8.2.4 </span>HTMLOptionsCollection</a></li>
-       <li><a href=#htmlpropertiescollection-0><span class=secno>2.8.2.5 </span>HTMLPropertiesCollection</a></ol></li>
+       <li><a href=#htmlallcollection-0><span class=secno>2.8.2.1 </span>HTMLAllCollection</a></li>
+       <li><a href=#htmlformcontrolscollection-0><span class=secno>2.8.2.2 </span>HTMLFormControlsCollection</a></li>
+       <li><a href=#htmloptionscollection-0><span class=secno>2.8.2.3 </span>HTMLOptionsCollection</a></li>
+       <li><a href=#htmlpropertiescollection-0><span class=secno>2.8.2.4 </span>HTMLPropertiesCollection</a></ol></li>
      <li><a href=#domtokenlist-0><span class=secno>2.8.3 </span>DOMTokenList</a></li>
      <li><a href=#domsettabletokenlist-0><span class=secno>2.8.4 </span>DOMSettableTokenList</a></li>
      <li><a href=#domstringmap-0><span class=secno>2.8.5 </span>DOMStringMap</a></li>
@@ -3520,6 +3519,8 @@
      <li><dfn id=processinginstruction><code>ProcessingInstruction</code></dfn> interface</li>
      <li><dfn id=text><code>Text</code></dfn> interface</li>
 
+     <li><dfn id=htmlcollection><code>HTMLCollection</code></dfn> interface, and the terms <dfn id=collections>collections</dfn> and <dfn id=represented-by-the-collection>represented by the collection</dfn></li>
+
      <li><dfn id=dom-domimplementation-createdocument title=dom-DOMImplementation-createDocument><code>createDocument()</code></dfn> method</li>
      <li><dfn id=dom-document-createelement title=dom-Document-createElement><code>createElement()</code></dfn> method</li>
      <li><dfn id=dom-document-createelementns title=dom-Document-createElementNS><code>createElementNS()</code></dfn> method</li>
@@ -7878,124 +7879,18 @@
 
   <h4 id=collections-0><span class=secno>2.8.2 </span>Collections</h4>
 
-  <p>The <code><a href=#htmlcollection>HTMLCollection</a></code>, <code><a href=#htmlallcollection>HTMLAllCollection</a></code>,
+  <p>The <code><a href=#htmlallcollection>HTMLAllCollection</a></code>,
   <code><a href=#htmlformcontrolscollection>HTMLFormControlsCollection</a></code>,
   <code><a href=#htmloptionscollection>HTMLOptionsCollection</a></code>,
 <!--MD-->
   and <code><a href=#htmlpropertiescollection>HTMLPropertiesCollection</a></code>
 <!--MD-->
-  interfaces represent various
-  lists of DOM nodes. Collectively, objects implementing these
-  interfaces are called <dfn id=collections>collections</dfn>.</p>
+  interfaces are <a href=#collections>collections</a> derived from the
+  <code><a href=#htmlcollection>HTMLCollection</a></code> interface.</p>
 
-  <p>When a <a href=#collections title=collections>collection</a> is created, a
-  filter and a root are associated with the collection.</p>
 
-  <p class=example>For example, when the <code><a href=#htmlcollection>HTMLCollection</a></code>
-  object for the <code title=dom-document-images><a href=#dom-document-images>document.images</a></code> attribute is
-  created, it is associated with a filter that selects only
-  <code><a href=#the-img-element>img</a></code> elements, and rooted at the root of the
-  document.</p>
+  <h5 id=htmlallcollection-0><span class=secno>2.8.2.1 </span>HTMLAllCollection</h5>
 
-  <p>The <a href=#collections title=collections>collection</a> then <dfn id=represented-by-the-collection title="represented by the collection">represents</dfn> a
-  <a href=#live>live</a> view of the subtree rooted at the collection's
-  root, containing only nodes that match the given filter. The view is
-  linear. <span class=impl>In the absence of specific requirements
-  to the contrary, the nodes within the collection must be sorted in
-  <a href=#tree-order>tree order</a>.</span></p>
-
-  <div class=impl>
-
-  <p class=note>The <code title=dom-table-rows><a href=#dom-table-rows>rows</a></code> list is
-  not in tree order.</p>
-
-  <p>An attribute that returns a collection must return the same
-  object every time it is retrieved.</p>
-
-  </div>
-
-
-  <h5 id=htmlcollection-0><span class=secno>2.8.2.1 </span>HTMLCollection</h5>
-
-  <p>The <code><a href=#htmlcollection>HTMLCollection</a></code> interface represents a generic
-  <a href=#collections title=collections>collection</a> of elements.</p>
-
-  <pre class=idl>interface <dfn id=htmlcollection>HTMLCollection</dfn> {
-  readonly attribute unsigned long <a href=#dom-htmlcollection-length title=dom-HTMLCollection-length>length</a>;
-  caller getter <a href=#element>Element</a>? <a href=#dom-htmlcollection-item title=dom-HTMLCollection-item>item</a>(in unsigned long index);
-  caller getter object? <a href=#dom-htmlcollection-nameditem title=dom-HTMLCollection-namedItem>namedItem</a>(in DOMString name); // only returns Element
-};</pre>
-
-  <dl class=domintro><dt><var title="">collection</var> . <code title=dom-HTMLCollection-length><a href=#dom-htmlcollection-length>length</a></code></dt>
-   <dd>
-    <p>Returns the number of elements in the collection.</p>
-   </dd>
-
-   <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-item><a href=#dom-htmlcollection-item>item</a></code>(<var title="">index</var>)</dt>
-   <dt><var title="">collection</var>[<var title="">index</var>]</dt>
-   <dt><var title="">collection</var>(<var title="">index</var>)</dt>
-   <dd>
-    <p>Returns the item with index <var title="">index</var> from the collection. The items are sorted in <a href=#tree-order>tree order</a>.</p>
-   </dd>
-
-   <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-namedItem><a href=#dom-htmlcollection-nameditem>namedItem</a></code>(<var title="">name</var>)</dt>
-   <dt><var title="">collection</var>[<var title="">name</var>]</dt>
-   <dt><var title="">collection</var>(<var title="">name</var>)</dt>
-   <dd>
-    <p>Returns the first item with <a href=#concept-id title=concept-id>ID</a> or name <var title="">name</var>
-    from the collection.</p>
-    <p>Only <code><a href=#the-a-element>a</a></code>, <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-area-element>area</a></code>,
-    <code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>, <code><a href=#frame>frame</a></code>,
-    <code><a href=#frameset>frameset</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, and
-    <code><a href=#the-object-element>object</a></code> elements can have a name for the purpose of
-    this method; their name is given by the value of their <code title="">name</code> attribute.</p>
-   </dd>
-  </dl><div class=impl>
-
-  <p>The object's <a href=#supported-property-indices>supported property indices</a> are the
-  numbers in the range zero to one less than the number of nodes
-  <a href=#represented-by-the-collection>represented by the collection</a>. If there are no such
-  elements, then there are no <a href=#supported-property-indices>supported property
-  indices</a>.</p>
-
-  <p>The <dfn id=dom-htmlcollection-length title=dom-HTMLCollection-length><code>length</code></dfn>
-  attribute must return the number of nodes <a href=#represented-by-the-collection>represented by the
-  collection</a>.</p>
-
-  <p>The <dfn id=dom-htmlcollection-item title=dom-HTMLCollection-item><code>item(<var title="">index</var>)</code></dfn> method must return the <var title="">index</var>th node in the collection. If there is no <var title="">index</var>th node in the collection, then the method must
-  return null.</p>
-
-  <p>The <a href=#supported-property-names>supported property names</a> consist
-  of the values of the <code title="">name</code> attributes of each
-  <code><a href=#the-a-element>a</a></code>, <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-area-element>area</a></code>,
-  <code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>, <code><a href=#frame>frame</a></code>,
-  <code><a href=#frameset>frameset</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, and
-  <code><a href=#the-object-element>object</a></code> element <a href=#represented-by-the-collection>represented by the
-  collection</a> with a <code title="">name</code> attribute, plus
-  the list of IDs that the elements <a href=#represented-by-the-collection>represented by the
-  collection</a> have.</p>
-
-  <p>The <dfn id=dom-htmlcollection-nameditem title=dom-HTMLCollection-namedItem><code>namedItem(<var title="">key</var>)</code></dfn> method must return the first node
-  in the collection that matches either of the following
-  requirements:</p>
-
-  <ul><li>It is an <code><a href=#the-a-element>a</a></code>, <code><a href=#the-applet-element>applet</a></code>,
-   <code><a href=#the-area-element>area</a></code>, <code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>,
-   <code><a href=#frame>frame</a></code>, <code><a href=#frameset>frameset</a></code>, <code><a href=#the-iframe-element>iframe</a></code>,
-   <code><a href=#the-img-element>img</a></code>, or <code><a href=#the-object-element>object</a></code> element with a <code title="">name</code> attribute equal to <var title="">key</var>,
-   or,</li>
-
-   <li>It is an element with an <a href=#concept-id title=concept-id>ID</a>
-   equal to <var title="">key</var>.</li>
-
-  </ul><p>If no such elements are found, then the method must return
-  null.</p>
-
-  </div>
-
-
-  <h5 id=htmlallcollection-0><span class=secno>2.8.2.2 </span>HTMLAllCollection</h5>
-
   <p>The <code><a href=#htmlallcollection>HTMLAllCollection</a></code> interface represents a generic
   <a href=#collections title=collections>collection</a> of elements just like
   <code><a href=#htmlcollection>HTMLCollection</a></code>, with the exception that its <code title=dom-HTMLAllCollection-namedItem><a href=#dom-htmlallcollection-nameditem>namedItem()</a></code> method
@@ -8003,17 +7898,17 @@
   multiple matching elements.</p>
 
   <pre class=idl>interface <dfn id=htmlallcollection>HTMLAllCollection</dfn> : <a href=#htmlcollection>HTMLCollection</a> {
-  // inherits <a href=#dom-htmlcollection-length title=dom-HTMLCollection-length>length</a> and <a href=#dom-htmlcollection-item title=dom-HTMLCollection-item>item</a>()
+  // inherits <span title=dom-HTMLCollection-length>length</span> and <span title=dom-HTMLCollection-item>item</span>()
   caller getter object? <a href=#dom-htmlallcollection-nameditem title=dom-HTMLAllCollection-namedItem>namedItem</a>(in DOMString name); // overrides inherited namedItem()
   <a href=#htmlallcollection>HTMLAllCollection</a> <a href=#dom-htmlallcollection-tags title=dom-HTMLAllCollection-tags>tags</a>(in DOMString tagName);
 };</pre>
 
-  <dl class=domintro><dt><var title="">collection</var> . <code title=dom-HTMLCollection-length><a href=#dom-htmlcollection-length>length</a></code></dt>
+  <dl class=domintro><dt><var title="">collection</var> . <code title=dom-HTMLCollection-length>length</code></dt>
    <dd>
     <p>Returns the number of elements in the collection.</p>
    </dd>
 
-   <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-item><a href=#dom-htmlcollection-item>item</a></code>(<var title="">index</var>)</dt>
+   <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-item>item</code>(<var title="">index</var>)</dt>
    <dt><var title="">collection</var>[<var title="">index</var>]</dt>
    <dt><var title="">collection</var>(<var title="">index</var>)</dt>
    <dd>
@@ -8090,14 +7985,14 @@
   </div>
 
 
-  <h5 id=htmlformcontrolscollection-0><span class=secno>2.8.2.3 </span>HTMLFormControlsCollection</h5>
+  <h5 id=htmlformcontrolscollection-0><span class=secno>2.8.2.2 </span>HTMLFormControlsCollection</h5>
 
   <p>The <code><a href=#htmlformcontrolscollection>HTMLFormControlsCollection</a></code> interface represents
   a <a href=#collections title=collections>collection</a> of <a href=#category-listed title=category-listed>listed elements</a> in <code><a href=#the-form-element>form</a></code>
   and <code><a href=#the-fieldset-element>fieldset</a></code> elements.</p>
 
   <pre class=idl>interface <dfn id=htmlformcontrolscollection>HTMLFormControlsCollection</dfn> : <a href=#htmlcollection>HTMLCollection</a> {
-  // inherits <a href=#dom-htmlcollection-length title=dom-HTMLCollection-length>length</a> and <a href=#dom-htmlcollection-item title=dom-HTMLCollection-item>item</a>()
+  // inherits <span title=dom-HTMLCollection-length>length</span> and <span title=dom-HTMLCollection-item>item</span>()
   caller getter object? <a href=#dom-htmlformcontrolscollection-nameditem title=dom-HTMLFormControlsCollection-namedItem>namedItem</a>(in DOMString name); // overrides inherited namedItem()
 };
 
@@ -8105,12 +8000,12 @@
           attribute DOMString <a href=#dom-radionodelist-value title=dom-RadioNodeList-value>value</a>;
 };</pre>
 
-  <dl class=domintro><dt><var title="">collection</var> . <code title=dom-HTMLCollection-length><a href=#dom-htmlcollection-length>length</a></code></dt>
+  <dl class=domintro><dt><var title="">collection</var> . <code title=dom-HTMLCollection-length>length</code></dt>
    <dd>
     <p>Returns the number of elements in the collection.</p>
    </dd>
 
-   <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-item><a href=#dom-htmlcollection-item>item</a></code>(<var title="">index</var>)</dt>
+   <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-item>item</code>(<var title="">index</var>)</dt>
    <dt><var title="">collection</var>[<var title="">index</var>]</dt>
    <dt><var title="">collection</var>(<var title="">index</var>)</dt>
    <dd>
@@ -8204,7 +8099,7 @@
 --></div>
 
 
-  <h5 id=htmloptionscollection-0><span class=secno>2.8.2.4 </span>HTMLOptionsCollection</h5>
+  <h5 id=htmloptionscollection-0><span class=secno>2.8.2.3 </span>HTMLOptionsCollection</h5>
 
   <p>The <code><a href=#htmloptionscollection>HTMLOptionsCollection</a></code> interface represents a
   list of <code><a href=#the-option-element>option</a></code> elements. It is always rooted on a
@@ -8212,7 +8107,7 @@
   manipulate that element's descendants.</p>
 
   <pre class=idl>interface <dfn id=htmloptionscollection>HTMLOptionsCollection</dfn> : <a href=#htmlcollection>HTMLCollection</a> {
-  // inherits <a href=#dom-htmlcollection-item title=dom-HTMLCollection-item>item</a>()
+  // inherits <span title=dom-HTMLCollection-item>item</span>()
            attribute unsigned long <a href=#dom-htmloptionscollection-length title=dom-HTMLOptionsCollection-length>length</a>; // overrides inherited length
   caller getter object? <a href=#dom-htmloptionscollection-nameditem title=dom-HTMLOptionsCollection-namedItem>namedItem</a>(in DOMString name); // overrides inherited namedItem()
   void <a href=#dom-htmloptionscollection-add title=dom-HTMLOptionsCollection-add>add</a>(in <a href=#htmlelement>HTMLElement</a> element, in optional <a href=#htmlelement>HTMLElement</a>? before);
@@ -8228,7 +8123,7 @@
     <p>When set to a greater number, adds new blank <code><a href=#the-option-element>option</a></code> elements to that container.</p>
    </dd>
 
-   <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-item><a href=#dom-htmlcollection-item>item</a></code>(<var title="">index</var>)</dt>
+   <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-item>item</code>(<var title="">index</var>)</dt>
    <dt><var title="">collection</var>[<var title="">index</var>]</dt>
    <dt><var title="">collection</var>(<var title="">index</var>)</dt>
    <dd>
@@ -8380,7 +8275,7 @@
 <!--MD-->
   <div data-component="HTML Microdata (editor: Ian Hickson)">
 
-  <h5 id=htmlpropertiescollection-0><span class=secno>2.8.2.5 </span>HTMLPropertiesCollection</h5>
+  <h5 id=htmlpropertiescollection-0><span class=secno>2.8.2.4 </span>HTMLPropertiesCollection</h5>
 
   <p>The <code><a href=#htmlpropertiescollection>HTMLPropertiesCollection</a></code> interface represents a
   <a href=#collections title=collections>collection</a> of elements that add
@@ -8388,7 +8283,7 @@
   model.</p>
 
   <pre class=idl>interface <dfn id=htmlpropertiescollection>HTMLPropertiesCollection</dfn> : <a href=#htmlcollection>HTMLCollection</a> {
-  // inherits <a href=#dom-htmlcollection-length title=dom-HTMLCollection-length>length</a> and <a href=#dom-htmlcollection-item title=dom-HTMLCollection-item>item</a>()
+  // inherits <span title=dom-HTMLCollection-length>length</span> and <span title=dom-HTMLCollection-item>item</span>()
   caller getter <a href=#propertynodelist>PropertyNodeList</a>? <a href=#dom-htmlpropertiescollection-nameditem title=dom-HTMLPropertiesCollection-namedItem>namedItem</a>(in DOMString name); // overrides inherited namedItem()
   readonly attribute <span>DOMStringList</span> <a href=#dom-htmlpropertiescollection-names title=dom-HTMLPropertiesCollection-names>names</a>;
 };
@@ -8399,12 +8294,12 @@
   <a href=#propertyvaluearray>PropertyValueArray</a> <a href=#dom-propertynodelist-getvalues title=dom-PropertyNodeList-getValues>getValues</a>();
 };</pre>
 
-  <dl class=domintro><dt><var title="">collection</var> . <code title=dom-HTMLCollection-length><a href=#dom-htmlcollection-length>length</a></code></dt>
+  <dl class=domintro><dt><var title="">collection</var> . <code title=dom-HTMLCollection-length>length</code></dt>
    <dd>
     <p>Returns the number of elements in the collection.</p>
    </dd>
 
-   <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-item><a href=#dom-htmlcollection-item>item</a></code>(<var title="">index</var>)</dt>
+   <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-item>item</code>(<var title="">index</var>)</dt>
    <dt><var title="">collection</var>[<var title="">index</var>]</dt>
    <dt><var title="">collection</var>(<var title="">index</var>)</dt>
    <dd>

Modified: index
===================================================================
--- index	2011-07-26 17:42:26 UTC (rev 6326)
+++ index	2011-07-26 23:32:35 UTC (rev 6327)
@@ -370,11 +370,10 @@
      <li><a href=#reflecting-content-attributes-in-idl-attributes><span class=secno>2.8.1 </span>Reflecting content attributes in IDL attributes</a></li>
      <li><a href=#collections-0><span class=secno>2.8.2 </span>Collections</a>
       <ol>
-       <li><a href=#htmlcollection-0><span class=secno>2.8.2.1 </span>HTMLCollection</a></li>
-       <li><a href=#htmlallcollection-0><span class=secno>2.8.2.2 </span>HTMLAllCollection</a></li>
-       <li><a href=#htmlformcontrolscollection-0><span class=secno>2.8.2.3 </span>HTMLFormControlsCollection</a></li>
-       <li><a href=#htmloptionscollection-0><span class=secno>2.8.2.4 </span>HTMLOptionsCollection</a></li>
-       <li><a href=#htmlpropertiescollection-0><span class=secno>2.8.2.5 </span>HTMLPropertiesCollection</a></ol></li>
+       <li><a href=#htmlallcollection-0><span class=secno>2.8.2.1 </span>HTMLAllCollection</a></li>
+       <li><a href=#htmlformcontrolscollection-0><span class=secno>2.8.2.2 </span>HTMLFormControlsCollection</a></li>
+       <li><a href=#htmloptionscollection-0><span class=secno>2.8.2.3 </span>HTMLOptionsCollection</a></li>
+       <li><a href=#htmlpropertiescollection-0><span class=secno>2.8.2.4 </span>HTMLPropertiesCollection</a></ol></li>
      <li><a href=#domtokenlist-0><span class=secno>2.8.3 </span>DOMTokenList</a></li>
      <li><a href=#domsettabletokenlist-0><span class=secno>2.8.4 </span>DOMSettableTokenList</a></li>
      <li><a href=#domstringmap-0><span class=secno>2.8.5 </span>DOMStringMap</a></li>
@@ -3422,6 +3421,8 @@
      <li><dfn id=processinginstruction><code>ProcessingInstruction</code></dfn> interface</li>
      <li><dfn id=text><code>Text</code></dfn> interface</li>
 
+     <li><dfn id=htmlcollection><code>HTMLCollection</code></dfn> interface, and the terms <dfn id=collections>collections</dfn> and <dfn id=represented-by-the-collection>represented by the collection</dfn></li>
+
      <li><dfn id=dom-domimplementation-createdocument title=dom-DOMImplementation-createDocument><code>createDocument()</code></dfn> method</li>
      <li><dfn id=dom-document-createelement title=dom-Document-createElement><code>createElement()</code></dfn> method</li>
      <li><dfn id=dom-document-createelementns title=dom-Document-createElementNS><code>createElementNS()</code></dfn> method</li>
@@ -7747,124 +7748,18 @@
 
   <h4 id=collections-0><span class=secno>2.8.2 </span>Collections</h4>
 
-  <p>The <code><a href=#htmlcollection>HTMLCollection</a></code>, <code><a href=#htmlallcollection>HTMLAllCollection</a></code>,
+  <p>The <code><a href=#htmlallcollection>HTMLAllCollection</a></code>,
   <code><a href=#htmlformcontrolscollection>HTMLFormControlsCollection</a></code>,
   <code><a href=#htmloptionscollection>HTMLOptionsCollection</a></code>,
 <!--MD-->
   and <code><a href=#htmlpropertiescollection>HTMLPropertiesCollection</a></code>
 <!--MD-->
-  interfaces represent various
-  lists of DOM nodes. Collectively, objects implementing these
-  interfaces are called <dfn id=collections>collections</dfn>.</p>
+  interfaces are <a href=#collections>collections</a> derived from the
+  <code><a href=#htmlcollection>HTMLCollection</a></code> interface.</p>
 
-  <p>When a <a href=#collections title=collections>collection</a> is created, a
-  filter and a root are associated with the collection.</p>
 
-  <p class=example>For example, when the <code><a href=#htmlcollection>HTMLCollection</a></code>
-  object for the <code title=dom-document-images><a href=#dom-document-images>document.images</a></code> attribute is
-  created, it is associated with a filter that selects only
-  <code><a href=#the-img-element>img</a></code> elements, and rooted at the root of the
-  document.</p>
+  <h5 id=htmlallcollection-0><span class=secno>2.8.2.1 </span>HTMLAllCollection</h5>
 
-  <p>The <a href=#collections title=collections>collection</a> then <dfn id=represented-by-the-collection title="represented by the collection">represents</dfn> a
-  <a href=#live>live</a> view of the subtree rooted at the collection's
-  root, containing only nodes that match the given filter. The view is
-  linear. <span class=impl>In the absence of specific requirements
-  to the contrary, the nodes within the collection must be sorted in
-  <a href=#tree-order>tree order</a>.</span></p>
-
-  <div class=impl>
-
-  <p class=note>The <code title=dom-table-rows><a href=#dom-table-rows>rows</a></code> list is
-  not in tree order.</p>
-
-  <p>An attribute that returns a collection must return the same
-  object every time it is retrieved.</p>
-
-  </div>
-
-
-  <h5 id=htmlcollection-0><span class=secno>2.8.2.1 </span>HTMLCollection</h5>
-
-  <p>The <code><a href=#htmlcollection>HTMLCollection</a></code> interface represents a generic
-  <a href=#collections title=collections>collection</a> of elements.</p>
-
-  <pre class=idl>interface <dfn id=htmlcollection>HTMLCollection</dfn> {
-  readonly attribute unsigned long <a href=#dom-htmlcollection-length title=dom-HTMLCollection-length>length</a>;
-  caller getter <a href=#element>Element</a>? <a href=#dom-htmlcollection-item title=dom-HTMLCollection-item>item</a>(in unsigned long index);
-  caller getter object? <a href=#dom-htmlcollection-nameditem title=dom-HTMLCollection-namedItem>namedItem</a>(in DOMString name); // only returns Element
-};</pre>
-
-  <dl class=domintro><dt><var title="">collection</var> . <code title=dom-HTMLCollection-length><a href=#dom-htmlcollection-length>length</a></code></dt>
-   <dd>
-    <p>Returns the number of elements in the collection.</p>
-   </dd>
-
-   <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-item><a href=#dom-htmlcollection-item>item</a></code>(<var title="">index</var>)</dt>
-   <dt><var title="">collection</var>[<var title="">index</var>]</dt>
-   <dt><var title="">collection</var>(<var title="">index</var>)</dt>
-   <dd>
-    <p>Returns the item with index <var title="">index</var> from the collection. The items are sorted in <a href=#tree-order>tree order</a>.</p>
-   </dd>
-
-   <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-namedItem><a href=#dom-htmlcollection-nameditem>namedItem</a></code>(<var title="">name</var>)</dt>
-   <dt><var title="">collection</var>[<var title="">name</var>]</dt>
-   <dt><var title="">collection</var>(<var title="">name</var>)</dt>
-   <dd>
-    <p>Returns the first item with <a href=#concept-id title=concept-id>ID</a> or name <var title="">name</var>
-    from the collection.</p>
-    <p>Only <code><a href=#the-a-element>a</a></code>, <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-area-element>area</a></code>,
-    <code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>, <code><a href=#frame>frame</a></code>,
-    <code><a href=#frameset>frameset</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, and
-    <code><a href=#the-object-element>object</a></code> elements can have a name for the purpose of
-    this method; their name is given by the value of their <code title="">name</code> attribute.</p>
-   </dd>
-  </dl><div class=impl>
-
-  <p>The object's <a href=#supported-property-indices>supported property indices</a> are the
-  numbers in the range zero to one less than the number of nodes
-  <a href=#represented-by-the-collection>represented by the collection</a>. If there are no such
-  elements, then there are no <a href=#supported-property-indices>supported property
-  indices</a>.</p>
-
-  <p>The <dfn id=dom-htmlcollection-length title=dom-HTMLCollection-length><code>length</code></dfn>
-  attribute must return the number of nodes <a href=#represented-by-the-collection>represented by the
-  collection</a>.</p>
-
-  <p>The <dfn id=dom-htmlcollection-item title=dom-HTMLCollection-item><code>item(<var title="">index</var>)</code></dfn> method must return the <var title="">index</var>th node in the collection. If there is no <var title="">index</var>th node in the collection, then the method must
-  return null.</p>
-
-  <p>The <a href=#supported-property-names>supported property names</a> consist
-  of the values of the <code title="">name</code> attributes of each
-  <code><a href=#the-a-element>a</a></code>, <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-area-element>area</a></code>,
-  <code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>, <code><a href=#frame>frame</a></code>,
-  <code><a href=#frameset>frameset</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#the-img-element>img</a></code>, and
-  <code><a href=#the-object-element>object</a></code> element <a href=#represented-by-the-collection>represented by the
-  collection</a> with a <code title="">name</code> attribute, plus
-  the list of IDs that the elements <a href=#represented-by-the-collection>represented by the
-  collection</a> have.</p>
-
-  <p>The <dfn id=dom-htmlcollection-nameditem title=dom-HTMLCollection-namedItem><code>namedItem(<var title="">key</var>)</code></dfn> method must return the first node
-  in the collection that matches either of the following
-  requirements:</p>
-
-  <ul><li>It is an <code><a href=#the-a-element>a</a></code>, <code><a href=#the-applet-element>applet</a></code>,
-   <code><a href=#the-area-element>area</a></code>, <code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-form-element>form</a></code>,
-   <code><a href=#frame>frame</a></code>, <code><a href=#frameset>frameset</a></code>, <code><a href=#the-iframe-element>iframe</a></code>,
-   <code><a href=#the-img-element>img</a></code>, or <code><a href=#the-object-element>object</a></code> element with a <code title="">name</code> attribute equal to <var title="">key</var>,
-   or,</li>
-
-   <li>It is an element with an <a href=#concept-id title=concept-id>ID</a>
-   equal to <var title="">key</var>.</li>
-
-  </ul><p>If no such elements are found, then the method must return
-  null.</p>
-
-  </div>
-
-
-  <h5 id=htmlallcollection-0><span class=secno>2.8.2.2 </span>HTMLAllCollection</h5>
-
   <p>The <code><a href=#htmlallcollection>HTMLAllCollection</a></code> interface represents a generic
   <a href=#collections title=collections>collection</a> of elements just like
   <code><a href=#htmlcollection>HTMLCollection</a></code>, with the exception that its <code title=dom-HTMLAllCollection-namedItem><a href=#dom-htmlallcollection-nameditem>namedItem()</a></code> method
@@ -7872,17 +7767,17 @@
   multiple matching elements.</p>
 
   <pre class=idl>interface <dfn id=htmlallcollection>HTMLAllCollection</dfn> : <a href=#htmlcollection>HTMLCollection</a> {
-  // inherits <a href=#dom-htmlcollection-length title=dom-HTMLCollection-length>length</a> and <a href=#dom-htmlcollection-item title=dom-HTMLCollection-item>item</a>()
+  // inherits <span title=dom-HTMLCollection-length>length</span> and <span title=dom-HTMLCollection-item>item</span>()
   caller getter object? <a href=#dom-htmlallcollection-nameditem title=dom-HTMLAllCollection-namedItem>namedItem</a>(in DOMString name); // overrides inherited namedItem()
   <a href=#htmlallcollection>HTMLAllCollection</a> <a href=#dom-htmlallcollection-tags title=dom-HTMLAllCollection-tags>tags</a>(in DOMString tagName);
 };</pre>
 
-  <dl class=domintro><dt><var title="">collection</var> . <code title=dom-HTMLCollection-length><a href=#dom-htmlcollection-length>length</a></code></dt>
+  <dl class=domintro><dt><var title="">collection</var> . <code title=dom-HTMLCollection-length>length</code></dt>
    <dd>
     <p>Returns the number of elements in the collection.</p>
    </dd>
 
-   <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-item><a href=#dom-htmlcollection-item>item</a></code>(<var title="">index</var>)</dt>
+   <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-item>item</code>(<var title="">index</var>)</dt>
    <dt><var title="">collection</var>[<var title="">index</var>]</dt>
    <dt><var title="">collection</var>(<var title="">index</var>)</dt>
    <dd>
@@ -7959,14 +7854,14 @@
   </div>
 
 
-  <h5 id=htmlformcontrolscollection-0><span class=secno>2.8.2.3 </span>HTMLFormControlsCollection</h5>
+  <h5 id=htmlformcontrolscollection-0><span class=secno>2.8.2.2 </span>HTMLFormControlsCollection</h5>
 
   <p>The <code><a href=#htmlformcontrolscollection>HTMLFormControlsCollection</a></code> interface represents
   a <a href=#collections title=collections>collection</a> of <a href=#category-listed title=category-listed>listed elements</a> in <code><a href=#the-form-element>form</a></code>
   and <code><a href=#the-fieldset-element>fieldset</a></code> elements.</p>
 
   <pre class=idl>interface <dfn id=htmlformcontrolscollection>HTMLFormControlsCollection</dfn> : <a href=#htmlcollection>HTMLCollection</a> {
-  // inherits <a href=#dom-htmlcollection-length title=dom-HTMLCollection-length>length</a> and <a href=#dom-htmlcollection-item title=dom-HTMLCollection-item>item</a>()
+  // inherits <span title=dom-HTMLCollection-length>length</span> and <span title=dom-HTMLCollection-item>item</span>()
   caller getter object? <a href=#dom-htmlformcontrolscollection-nameditem title=dom-HTMLFormControlsCollection-namedItem>namedItem</a>(in DOMString name); // overrides inherited namedItem()
 };
 
@@ -7974,12 +7869,12 @@
           attribute DOMString <a href=#dom-radionodelist-value title=dom-RadioNodeList-value>value</a>;
 };</pre>
 
-  <dl class=domintro><dt><var title="">collection</var> . <code title=dom-HTMLCollection-length><a href=#dom-htmlcollection-length>length</a></code></dt>
+  <dl class=domintro><dt><var title="">collection</var> . <code title=dom-HTMLCollection-length>length</code></dt>
    <dd>
     <p>Returns the number of elements in the collection.</p>
    </dd>
 
-   <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-item><a href=#dom-htmlcollection-item>item</a></code>(<var title="">index</var>)</dt>
+   <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-item>item</code>(<var title="">index</var>)</dt>
    <dt><var title="">collection</var>[<var title="">index</var>]</dt>
    <dt><var title="">collection</var>(<var title="">index</var>)</dt>
    <dd>
@@ -8073,7 +7968,7 @@
 --></div>
 
 
-  <h5 id=htmloptionscollection-0><span class=secno>2.8.2.4 </span>HTMLOptionsCollection</h5>
+  <h5 id=htmloptionscollection-0><span class=secno>2.8.2.3 </span>HTMLOptionsCollection</h5>
 
   <p>The <code><a href=#htmloptionscollection>HTMLOptionsCollection</a></code> interface represents a
   list of <code><a href=#the-option-element>option</a></code> elements. It is always rooted on a
@@ -8081,7 +7976,7 @@
   manipulate that element's descendants.</p>
 
   <pre class=idl>interface <dfn id=htmloptionscollection>HTMLOptionsCollection</dfn> : <a href=#htmlcollection>HTMLCollection</a> {
-  // inherits <a href=#dom-htmlcollection-item title=dom-HTMLCollection-item>item</a>()
+  // inherits <span title=dom-HTMLCollection-item>item</span>()
            attribute unsigned long <a href=#dom-htmloptionscollection-length title=dom-HTMLOptionsCollection-length>length</a>; // overrides inherited length
   caller getter object? <a href=#dom-htmloptionscollection-nameditem title=dom-HTMLOptionsCollection-namedItem>namedItem</a>(in DOMString name); // overrides inherited namedItem()
   void <a href=#dom-htmloptionscollection-add title=dom-HTMLOptionsCollection-add>add</a>(in <a href=#htmlelement>HTMLElement</a> element, in optional <a href=#htmlelement>HTMLElement</a>? before);
@@ -8097,7 +7992,7 @@
     <p>When set to a greater number, adds new blank <code><a href=#the-option-element>option</a></code> elements to that container.</p>
    </dd>
 
-   <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-item><a href=#dom-htmlcollection-item>item</a></code>(<var title="">index</var>)</dt>
+   <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-item>item</code>(<var title="">index</var>)</dt>
    <dt><var title="">collection</var>[<var title="">index</var>]</dt>
    <dt><var title="">collection</var>(<var title="">index</var>)</dt>
    <dd>
@@ -8249,7 +8144,7 @@
 <!--MD-->
   <div data-component="HTML Microdata (editor: Ian Hickson)">
 
-  <h5 id=htmlpropertiescollection-0><span class=secno>2.8.2.5 </span>HTMLPropertiesCollection</h5>
+  <h5 id=htmlpropertiescollection-0><span class=secno>2.8.2.4 </span>HTMLPropertiesCollection</h5>
 
   <p>The <code><a href=#htmlpropertiescollection>HTMLPropertiesCollection</a></code> interface represents a
   <a href=#collections title=collections>collection</a> of elements that add
@@ -8257,7 +8152,7 @@
   model.</p>
 
   <pre class=idl>interface <dfn id=htmlpropertiescollection>HTMLPropertiesCollection</dfn> : <a href=#htmlcollection>HTMLCollection</a> {
-  // inherits <a href=#dom-htmlcollection-length title=dom-HTMLCollection-length>length</a> and <a href=#dom-htmlcollection-item title=dom-HTMLCollection-item>item</a>()
+  // inherits <span title=dom-HTMLCollection-length>length</span> and <span title=dom-HTMLCollection-item>item</span>()
   caller getter <a href=#propertynodelist>PropertyNodeList</a>? <a href=#dom-htmlpropertiescollection-nameditem title=dom-HTMLPropertiesCollection-namedItem>namedItem</a>(in DOMString name); // overrides inherited namedItem()
   readonly attribute <span>DOMStringList</span> <a href=#dom-htmlpropertiescollection-names title=dom-HTMLPropertiesCollection-names>names</a>;
 };
@@ -8268,12 +8163,12 @@
   <a href=#propertyvaluearray>PropertyValueArray</a> <a href=#dom-propertynodelist-getvalues title=dom-PropertyNodeList-getValues>getValues</a>();
 };</pre>
 
-  <dl class=domintro><dt><var title="">collection</var> . <code title=dom-HTMLCollection-length><a href=#dom-htmlcollection-length>length</a></code></dt>
+  <dl class=domintro><dt><var title="">collection</var> . <code title=dom-HTMLCollection-length>length</code></dt>
    <dd>
     <p>Returns the number of elements in the collection.</p>
    </dd>
 
-   <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-item><a href=#dom-htmlcollection-item>item</a></code>(<var title="">index</var>)</dt>
+   <dt><var title="">element</var> = <var title="">collection</var> . <code title=dom-HTMLCollection-item>item</code>(<var title="">index</var>)</dt>
    <dt><var title="">collection</var>[<var title="">index</var>]</dt>
    <dt><var title="">collection</var>(<var title="">index</var>)</dt>
    <dd>

Modified: source
===================================================================
--- source	2011-07-26 17:42:26 UTC (rev 6326)
+++ source	2011-07-26 23:32:35 UTC (rev 6327)
@@ -20,6 +20,7 @@
  interface FileCallback { };
  interface FileList { };
  interface ArrayBuffer { };
+ interface HTMLCollection { };
 </pre>
 <!--START complete--><!--START epub-->
 <!--START html--><!--START dev-html-->
@@ -2415,6 +2416,8 @@
      <li><dfn><code>ProcessingInstruction</code></dfn> interface</li>
      <li><dfn><code>Text</code></dfn> interface</li>
 
+     <li><dfn><code>HTMLCollection</code></dfn> interface, and the terms <dfn>collections</dfn> and <dfn>represented by the collection</dfn></li>
+
      <li><dfn title="dom-DOMImplementation-createDocument"><code>createDocument()</code></dfn> method</li>
      <li><dfn title="dom-Document-createElement"><code>createElement()</code></dfn> method</li>
      <li><dfn title="dom-Document-createElementNS"><code>createElementNS()</code></dfn> method</li>
@@ -7685,140 +7688,16 @@
 
   <h4>Collections</h4>
 
-  <p>The <code>HTMLCollection</code>, <code>HTMLAllCollection</code>,
+  <p>The <code>HTMLAllCollection</code>,
   <code>HTMLFormControlsCollection</code>,
   <code>HTMLOptionsCollection</code>,
 <!--END w3c-html--><!--MD-->
   and <code>HTMLPropertiesCollection</code>
 <!--START w3c-html--><!--MD-->
-  interfaces represent various
-  lists of DOM nodes. Collectively, objects implementing these
-  interfaces are called <dfn>collections</dfn>.</p>
+  interfaces are <span>collections</span> derived from the
+  <code>HTMLCollection</code> interface.</p>
 
-  <p>When a <span title="collections">collection</span> is created, a
-  filter and a root are associated with the collection.</p>
 
-  <p class="example">For example, when the <code>HTMLCollection</code>
-  object for the <code
-  title="dom-document-images">document.images</code> attribute is
-  created, it is associated with a filter that selects only
-  <code>img</code> elements, and rooted at the root of the
-  document.</p>
-
-  <p>The <span title="collections">collection</span> then <dfn
-  title="represented by the collection">represents</dfn> a
-  <span>live</span> view of the subtree rooted at the collection's
-  root, containing only nodes that match the given filter. The view is
-  linear. <span class="impl">In the absence of specific requirements
-  to the contrary, the nodes within the collection must be sorted in
-  <span>tree order</span>.</span></p>
-
-  <div class="impl">
-
-  <p class="note">The <code title="dom-table-rows">rows</code> list is
-  not in tree order.</p>
-
-  <p>An attribute that returns a collection must return the same
-  object every time it is retrieved.</p>
-
-  </div>
-
-
-  <h5>HTMLCollection</h5>
-
-  <p>The <code>HTMLCollection</code> interface represents a generic
-  <span title="collections">collection</span> of elements.</p>
-
-  <pre class="idl">interface <dfn>HTMLCollection</dfn> {
-  readonly attribute unsigned long <span title="dom-HTMLCollection-length">length</span>;
-  caller getter <span>Element</span>? <span title="dom-HTMLCollection-item">item</span>(in unsigned long index);
-  caller getter object? <span title="dom-HTMLCollection-namedItem">namedItem</span>(in DOMString name); // only returns Element
-};</pre>
-
-  <dl class="domintro">
-
-   <dt><var title="">collection</var> . <code title="dom-HTMLCollection-length">length</code></dt>
-   <dd>
-    <p>Returns the number of elements in the collection.</p>
-   </dd>
-
-   <dt><var title="">element</var> = <var title="">collection</var> . <code title="dom-HTMLCollection-item">item</code>(<var title="">index</var>)</dt>
-   <dt><var title="">collection</var>[<var title="">index</var>]</dt>
-   <dt><var title="">collection</var>(<var title="">index</var>)</dt>
-   <dd>
-    <p>Returns the item with index <var title="">index</var> from the collection. The items are sorted in <span>tree order</span>.</p>
-   </dd>
-
-   <dt><var title="">element</var> = <var title="">collection</var> . <code title="dom-HTMLCollection-namedItem">namedItem</code>(<var title="">name</var>)</dt>
-   <dt><var title="">collection</var>[<var title="">name</var>]</dt>
-   <dt><var title="">collection</var>(<var title="">name</var>)</dt>
-   <dd>
-    <p>Returns the first item with <span title="concept-id">ID</span> or name <var title="">name</var>
-    from the collection.</p>
-    <p>Only <code>a</code>, <code>applet</code>, <code>area</code>,
-    <code>embed</code>, <code>form</code>, <code>frame</code>,
-    <code>frameset</code>, <code>iframe</code>, <code>img</code>, and
-    <code>object</code> elements can have a name for the purpose of
-    this method; their name is given by the value of their <code
-    title="">name</code> attribute.</p>
-   </dd>
-  </dl>
-
-  <div class="impl">
-
-  <p>The object's <span>supported property indices</span> are the
-  numbers in the range zero to one less than the number of nodes
-  <span>represented by the collection</span>. If there are no such
-  elements, then there are no <span>supported property
-  indices</span>.</p>
-
-  <p>The <dfn
-  title="dom-HTMLCollection-length"><code>length</code></dfn>
-  attribute must return the number of nodes <span>represented by the
-  collection</span>.</p>
-
-  <p>The <dfn title="dom-HTMLCollection-item"><code>item(<var
-  title="">index</var>)</code></dfn> method must return the <var
-  title="">index</var>th node in the collection. If there is no <var
-  title="">index</var>th node in the collection, then the method must
-  return null.</p>
-
-  <p>The <span>supported property names</span> consist
-  of the values of the <code title="">name</code> attributes of each
-  <code>a</code>, <code>applet</code>, <code>area</code>,
-  <code>embed</code>, <code>form</code>, <code>frame</code>,
-  <code>frameset</code>, <code>iframe</code>, <code>img</code>, and
-  <code>object</code> element <span>represented by the
-  collection</span> with a <code title="">name</code> attribute, plus
-  the list of IDs that the elements <span>represented by the
-  collection</span> have.</p>
-
-  <p>The <dfn
-  title="dom-HTMLCollection-namedItem"><code>namedItem(<var
-  title="">key</var>)</code></dfn> method must return the first node
-  in the collection that matches either of the following
-  requirements:</p>
-
-  <ul>
-
-   <li>It is an <code>a</code>, <code>applet</code>,
-   <code>area</code>, <code>embed</code>, <code>form</code>,
-   <code>frame</code>, <code>frameset</code>, <code>iframe</code>,
-   <code>img</code>, or <code>object</code> element with a <code
-   title="">name</code> attribute equal to <var title="">key</var>,
-   or,</li>
-
-   <li>It is an element with an <span title="concept-id">ID</span>
-   equal to <var title="">key</var>.</li>
-
-  </ul>
-
-  <p>If no such elements are found, then the method must return
-  null.</p>
-
-  </div>
-
-
   <h5>HTMLAllCollection</h5>
 
   <p>The <code>HTMLAllCollection</code> interface represents a generic




More information about the Commit-Watchers mailing list