[html5] r2656 - [e] (0) Revamp how <select> handles enumeration, for better compatibility with W [...]
whatwg at whatwg.org
whatwg at whatwg.org
Tue Jan 13 03:43:51 PST 2009
Author: ianh
Date: 2009-01-13 03:43:50 -0800 (Tue, 13 Jan 2009)
New Revision: 2656
Modified:
index
source
Log:
[e] (0) 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.
Modified: index
===================================================================
--- index 2009-01-13 11:26:06 UTC (rev 2655)
+++ index 2009-01-13 11:43:50 UTC (rev 2656)
@@ -28122,7 +28122,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>;
@@ -28135,6 +28135,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);
@@ -28276,21 +28278,29 @@
elements in the <a href=#concept-select-option-list title=concept-select-option-list>list of
options</a>.</p>
- <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>
-
- <p>The <span>indices of the supported indexed properties</span> at
- any instant are the indicies supported by the object returned by the
+ <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>
+ 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>
+ <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>
+
+ <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>
+
+ <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>
+
<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
Modified: source
===================================================================
--- source 2009-01-13 11:26:06 UTC (rev 2655)
+++ source 2009-01-13 11:43:50 UTC (rev 2656)
@@ -31504,7 +31504,7 @@
<dd><code title="attr-select-size">size</code></dd>
<dt>DOM interface:</dt>
<dd>
-<pre class="idl">[IndexGetter]
+<pre class="idl">[Callable=<span title="dom-select-namedItem">namedItem</span>]
interface <dfn>HTMLSelectElement</dfn> : <span>HTMLElement</span> {
attribute boolean <span title="dom-fe-autofocus">autofocus</span>;
attribute boolean <span title="dom-fe-disabled">disabled</span>;
@@ -31517,6 +31517,8 @@
readonly attribute <span>HTMLOptionsCollection</span> <span title="dom-select-options">options</span>;
attribute unsigned long <span title="dom-select-length">length</span>;
+ [IndexGetter] any <span title="dom-select-item">item</span>(in DOMString name);
+ [NameGetter] any <span title="dom-select-namedItem">namedItem</span>(in DOMString name);
void <span title="dom-select-add">add</span>(in <span>HTMLElement</span> element, in <span>HTMLElement</span> before);
void <span title="dom-select-add">add</span>(in <span>HTMLElement</span> element, in long before);
void <span title="dom-select-remove">remove</span>(in long index);
@@ -31695,25 +31697,38 @@
elements in the <span title="concept-select-option-list">list of
options</span>.</p>
- <p>The <dfn title="dom-select-length"><code>length</code></dfn> DOM
- attribute, on getting and setting, must act like the <code
- title="dom-HTMLOptionsCollection-length">length</code> attribute on
- the <code>HTMLOptionsCollection</code> object returned by the <code
- title="dom-select-options">options</code> attribute. Similarly, the
- <dfn title="dom-select-add"><code>add()</code></dfn> and <dfn
+ <p>The <code title="dom-select-options">options</code> collection is
+ also mirrored on the <code>HTMLSelectElement</code> object. The <dfn
+ title="dom-select-length"><code>length</code></dfn> DOM attribute
+ must return the number of nodes <span title="represented by the
+ collection">represented</span> by the <code
+ title="dom-select-options">options</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">options</code> attribute at that
+ 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">options</code> attribute at that
+ instant.</p>
+
+ <p>The <dfn 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">options</code> collection, when invoked
+ with the same argument.</p>
+
+ <p>The <dfn 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">options</code> collection, when invoked
+ with the same argument.</p>
+
+ <p>Similarly, the <dfn
+ title="dom-select-add"><code>add()</code></dfn> and <dfn
title="dom-select-remove"><code>remove()</code></dfn> methods must
- act like their namesake methods on that same
- <code>HTMLOptionsCollection</code> object.</p>
+ act like their namesake methods on that same <code
+ title="dom-select-options">options</code> collection.</p>
- <p>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">options</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">options</code> attribute.</p>
-
<p>The <dfn
title="dom-select-selectedOptions"><code>selectedOptions</code></dfn>
DOM attribute must return an <code>HTMLCollection</code> rooted at
More information about the Commit-Watchers
mailing list