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

html5/spec Overview.html,1.1827,1.1828

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 13 Jan 2009 12:11:52 +0000
To: public-html-commits@w3.org
Message-Id: <E1LMi7d-0006dm-05@lionel-hutz.w3.org>

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv25479

Modified Files:
	Overview.html 
Log Message:
Define what is actually enumerated in collections, as per WebIDL. (whatwg r2658)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1827
retrieving revision 1.1828
diff -u -d -r1.1827 -r1.1828
--- Overview.html	13 Jan 2009 11:56:37 -0000	1.1827
+++ Overview.html	13 Jan 2009 12:11:50 -0000	1.1828
@@ -4477,10 +4477,22 @@
   readonly attribute unsigned long <a href=#dom-htmlcollection-length title=dom-HTMLCollection-length>length</a>;
   [IndexGetter] Element <a href=#dom-htmlcollection-item title=dom-HTMLCollection-item>item</a>(in unsigned long index);
   [NameGetter] Element <a href=#dom-htmlcollection-nameditem title=dom-HTMLCollection-namedItem>namedItem</a>(in DOMString name);
-};</pre><p>The <dfn id=dom-htmlcollection-length title=dom-HTMLCollection-length><code>length</code></dfn>
+};</pre><p>The object's <span>indices of the supported indexed
+  properties</span> 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 supported
+  properties.<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>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>The <dfn id=dom-htmlcollection-nameditem title=dom-HTMLCollection-namedItem><code>namedItem(<var title="">key</var>)</code></dfn> method must return the first node
+  return null.<p>The <span>names of the supported named properties</span> 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>frame</code>,
+  <code>frameset</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>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 the following requirements:<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>frame</code>, <code>frameset</code>, <code><a href=#the-iframe-element>iframe</a></code>,
@@ -4497,10 +4509,16 @@
   readonly attribute unsigned long <a href=#dom-htmlformcontrolscollection-length title=dom-HTMLFormControlsCollection-length>length</a>;
   [IndexGetter] <a href=#htmlelement>HTMLElement</a> <a href=#dom-htmlformcontrolscollection-item title=dom-HTMLFormControlsCollection-item>item</a>(in unsigned long index);
   [NameGetter] Object <a href=#dom-htmlformcontrolscollection-nameditem title=dom-HTMLFormControlsCollection-namedItem>namedItem</a>(in DOMString name);
-};</pre><p>The <dfn id=dom-htmlformcontrolscollection-length title=dom-HTMLFormControlsCollection-length><code>length</code></dfn>
+};</pre><p>The object's <span>indices of the supported indexed
+  properties</span> 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 supported
+  properties.<p>The <dfn id=dom-htmlformcontrolscollection-length title=dom-HTMLFormControlsCollection-length><code>length</code></dfn>
   attribute must return the number of nodes <a href=#represented-by-the-collection>represented by the
   collection</a>.<p>The <dfn id=dom-htmlformcontrolscollection-item title=dom-HTMLFormControlsCollection-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>The <dfn id=dom-htmlformcontrolscollection-nameditem title=dom-HTMLFormControlsCollection-namedItem><code>namedItem(<var title="">key</var>)</code></dfn>
+  return null.<p>The <span>names of the supported named properties</span> consist
+  of the values of all the <code title=attr-id><a href=#the-id-attribute>id</a></code> and <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attributes of all the elements
+  <a href=#represented-by-the-collection>represented by the collection</a>.<p>The <dfn id=dom-htmlformcontrolscollection-nameditem title=dom-HTMLFormControlsCollection-namedItem><code>namedItem(<var title="">key</var>)</code></dfn>
   method must act according to the following algorithm:
 
   <ol><li>If, at the time the method is called, there is exactly one node
@@ -4532,7 +4550,11 @@
   void <a href=#dom-htmloptionscollection-add title=dom-HTMLOptionsCollection-add>add</a>(in <a href=#htmlelement>HTMLElement</a> element, in <a href=#htmlelement>HTMLElement</a> before);
   void <a href=#dom-htmloptionscollection-add title=dom-HTMLOptionsCollection-add>add</a>(in <a href=#htmlelement>HTMLElement</a> element, in long before);
   void <a href=#dom-htmloptionscollection-remove title=dom-HTMLOptionsCollection-remove>remove</a>(in long index);
-};</pre><p>On getting, the <dfn id=dom-htmloptionscollection-length title=dom-HTMLOptionsCollection-length><code>length</code></dfn>
+};</pre><p>The object's <span>indices of the supported indexed
+  properties</span> 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 supported
+  properties.<p>On getting, the <dfn id=dom-htmloptionscollection-length title=dom-HTMLOptionsCollection-length><code>length</code></dfn>
   attribute must return the number of nodes <a href=#represented-by-the-collection>represented by the
   collection</a>.<p>On setting, the behavior depends on whether the new value is
   equal to, greater than, or less than the number of nodes
@@ -4549,7 +4571,9 @@
   or adds any <code><a href=#the-optgroup-element>optgroup</a></code> elements, and never adds new
   children to existing <code><a href=#the-optgroup-element>optgroup</a></code> elements (though it can
   remove children from them).<p>The <dfn id=dom-htmloptionscollection-item title=dom-HTMLOptionsCollection-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>The <dfn id=dom-htmloptionscollection-nameditem title=dom-HTMLOptionsCollection-namedItem><code>namedItem(<var title="">key</var>)</code></dfn>
+  return null.<p>The <span>names of the supported named properties</span> consist
+  of the values of all the <code title=attr-id><a href=#the-id-attribute>id</a></code> and <code title=attr-option-name>name</code> attributes of all the elements
+  <a href=#represented-by-the-collection>represented by the collection</a>.<p>The <dfn id=dom-htmloptionscollection-nameditem title=dom-HTMLOptionsCollection-namedItem><code>namedItem(<var title="">key</var>)</code></dfn>
   method must act according to the following algorithm:
 
   <ol><li>If, at the time the method is called, there is exactly one node
Received on Tuesday, 13 January 2009 12:12:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 13 January 2009 12:12:01 GMT