spec/Overview.html 1.1826 2656 Revamp how <select> handles enumeration,

Revamp how <select> handles enumeration, for better compatibility with
WebIDL and, to some very limited extent, IE. Full compatibility with IE
here is impossible without me losing my sanity. (whatwg r2656)

HTMLSelectElement
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1826.html#htmlselectelement
add()
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1826.html#dom-select-add
selectedOptions
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1826.html#dom-select-selectedoptions
item(index)
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1826.html#dom-select-item
length
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1826.html#dom-select-length
namedItem(index)
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1826.html#dom-select-nameditem
options
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1826.html#dom-select-options
4.10.6 The select element
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1826.html#the-select-element

http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1825&r2=1.1826&f=h
http://html5.org/tools/web-apps-tracker?from=2655&to=2656

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1825
retrieving revision 1.1826
diff -u -d -r1.1825 -r1.1826
--- Overview.html 13 Jan 2009 11:26:12 -0000 1.1825
+++ Overview.html 13 Jan 2009 11:43:55 -0000 1.1826
@@ -22872,7 +22872,7 @@
    <dd><code title=attr-select-size><a href=#attr-select-size>size</a></code></dd>
    <dt>DOM interface:</dt>
    <dd>
-<pre class=idl>[IndexGetter]
+<pre class=idl>[Callable=<a href=#dom-select-nameditem title=dom-select-namedItem>namedItem</a>]
 interface <dfn id=htmlselectelement>HTMLSelectElement</dfn> : <a href=#htmlelement>HTMLElement</a> {
            attribute boolean <a href=#dom-fe-autofocus title=dom-fe-autofocus>autofocus</a>;
            attribute boolean <a href=#dom-fe-disabled title=dom-fe-disabled>disabled</a>;
@@ -22885,6 +22885,8 @@
 
   readonly attribute <a href=#htmloptionscollection-0>HTMLOptionsCollection</a> <a href=#dom-select-options title=dom-select-options>options</a>;
            attribute unsigned long <a href=#dom-select-length title=dom-select-length>length</a>;
+  [IndexGetter] any <a href=#dom-select-item title=dom-select-item>item</a>(in DOMString name);
+  [NameGetter] any <a href=#dom-select-nameditem title=dom-select-namedItem>namedItem</a>(in DOMString name);
   void <a href=#dom-select-add title=dom-select-add>add</a>(in <a href=#htmlelement>HTMLElement</a> element, in <a href=#htmlelement>HTMLElement</a> before);
   void <a href=#dom-select-add title=dom-select-add>add</a>(in <a href=#htmlelement>HTMLElement</a> element, in long before);
   void <a href=#dom-select-remove title=dom-select-remove>remove</a>(in long index);
@@ -23000,18 +23002,22 @@
   DOM attribute must return an <code><a href=#htmloptionscollection-0>HTMLOptionsCollection</a></code>
   rooted at the <code><a href=#the-select-element>select</a></code> node, whose filter matches the
   elements in the <a href=#concept-select-option-list title=concept-select-option-list>list of
-  options</a>.<p>The <dfn id=dom-select-length title=dom-select-length><code>length</code></dfn> DOM
-  attribute, on getting and setting, must act like the <code title=dom-HTMLOptionsCollection-length><a href=#dom-htmloptionscollection-length>length</a></code> attribute on
-  the <code><a href=#htmloptionscollection-0>HTMLOptionsCollection</a></code> object returned by the <code title=dom-select-options><a href=#dom-select-options>options</a></code> attribute. Similarly, the
-  <dfn id=dom-select-add title=dom-select-add><code>add()</code></dfn> and <dfn id=dom-select-remove title=dom-select-remove><code>remove()</code></dfn> methods must
-  act like their namesake methods on that same
-  <code><a href=#htmloptionscollection-0>HTMLOptionsCollection</a></code> object.<p>The <span>indices of the supported indexed properties</span> at
-  any instant are the indicies supported by the object returned by the
+  options</a>.<p>The <code title=dom-select-options><a href=#dom-select-options>options</a></code> collection is
+  also mirrored on the <code><a href=#htmlselectelement>HTMLSelectElement</a></code> object. The <dfn id=dom-select-length title=dom-select-length><code>length</code></dfn> DOM attribute
+  must return the number of nodes <a href=#represented-by-the-collection title="represented by the
+  collection">represented</a> by the <code title=dom-select-options><a href=#dom-select-options>options</a></code> collection. The
+  <span>indices of the supported indexed properties</span> at any
+  instant are the indicies supported by the object returned by the
   <code title=dom-select-options><a href=#dom-select-options>options</a></code> attribute at that
-  instant. The value of the <span>corresponding indexed
-  property</span> whenever an indexed property is retrieved is the
-  value of the <span>corresponding indexed property</span> on the
-  object returned by the <code title=dom-select-options><a href=#dom-select-options>options</a></code> attribute.<p>The <dfn id=dom-select-selectedoptions title=dom-select-selectedOptions><code>selectedOptions</code></dfn>
+  instant. The <span>names of the supported named properties</span> at
+  any instant are the names supported by the object returned by the
+  <code title=dom-select-options><a href=#dom-select-options>options</a></code> attribute at that
+  instant.<p>The <dfn id=dom-select-item title=dom-select-item><code>item(<var title="">index</var>)</code></dfn> method must return the value
+  returned by the method of the same name on the <code title=dom-select-options><a href=#dom-select-options>options</a></code> collection, when invoked
+  with the same argument.<p>The <dfn id=dom-select-nameditem title=dom-select-namedItem><code>namedItem(<var title="">index</var>)</code></dfn> method must return the value
+  returned by the method of the same name on the <code title=dom-select-options><a href=#dom-select-options>options</a></code> collection, when invoked
+  with the same argument.<p>Similarly, the <dfn id=dom-select-add title=dom-select-add><code>add()</code></dfn> and <dfn id=dom-select-remove title=dom-select-remove><code>remove()</code></dfn> methods must
+  act like their namesake methods on that same <code title=dom-select-options><a href=#dom-select-options>options</a></code> collection.<p>The <dfn id=dom-select-selectedoptions title=dom-select-selectedOptions><code>selectedOptions</code></dfn>
   DOM attribute must return an <code><a href=#htmlcollection-0>HTMLCollection</a></code> rooted at
   the <code><a href=#the-select-element>select</a></code> node, whose filter matches the elements in
   the <a href=#concept-select-option-list title=concept-select-option-list>list of options</a>

Received on Tuesday, 13 January 2009 11:47:14 UTC