[html5] r2293 - [] (0) WF2: final bits of the <select> API

whatwg at whatwg.org whatwg at whatwg.org
Tue Oct 7 14:21:14 PDT 2008


Author: ianh
Date: 2008-10-07 14:21:13 -0700 (Tue, 07 Oct 2008)
New Revision: 2293

Modified:
   index
   source
Log:
[] (0) WF2: final bits of the <select> API

Modified: index
===================================================================
--- index	2008-10-07 21:06:35 UTC (rev 2292)
+++ index	2008-10-07 21:21:13 UTC (rev 2293)
@@ -26331,9 +26331,9 @@
   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);
 
-  readonly attribute <a href=#htmloptionscollection-0>HTMLOptionsCollection</a> <span title=dom-select-selectedOptions>selectedOptions</span>;
-           attribute long <span title=dom-select-selectedIndex>selectedIndex</span>;
-           attribute DOMString <span title=dom-select-value>value</span>;
+  readonly attribute <a href=#htmloptionscollection-0>HTMLOptionsCollection</a> <a href=#dom-select-selectedoptions title=dom-select-selectedOptions>selectedOptions</a>;
+           attribute long <a href=#dom-select-selectedindex title=dom-select-selectedIndex>selectedIndex</a>;
+           attribute DOMString <a href=#dom-select-value title=dom-select-value>value</a>;
 
   readonly attribute boolean <a href=#dom-cva-willvalidate title=dom-cva-willValidate>willValidate</a>;
   readonly attribute <span>ValidityState</span> <a href=#dom-cva-validity title=dom-cva-validity>validity</a>;
@@ -26438,14 +26438,42 @@
 
   <!-- XXX9 is blocked on WebIDL -->
 
-  <!--
-  XXX readonly attribute <span>HTMLOptionsCollection</span> <span title="dom-select-selectedOptions">selectedOptions</span>;
-  XXX          attribute long <span title="dom-select-selectedIndex">selectedIndex</span>;
-  XXX          attribute DOMString <span title="dom-select-value">value</span>;
-  -->
+  <p>The <dfn id=dom-select-selectedoptions title=dom-select-selectedOptions><code>selectedOptions</code></dfn>
+  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> that have their <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> set to
+  true.</p>
 
-  <p class=XXX>...</p>
+  <p>The <dfn id=dom-select-selectedindex title=dom-select-selectedIndex><code>selectedIndex</code></dfn>
+  DOM attribute, on getting, must return the <a href=#concept-option-index title=concept-option-index>index</a> of the first
+  <code><a href=#the-option-element>option</a></code> element in the <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> in
+  <a href=#tree-order>tree order</a> that has its <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> set to true,
+  if any. If there isn't one, then it must return -1.</p>
 
+  <p>On setting, the <code title=dom-select-selectedIndex><a href=#dom-select-selectedindex>selectedIndex</a></code> attribute must
+  set the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> of all the
+  <code><a href=#the-option-element>option</a></code> elements in the <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> to false,
+  and then the <code><a href=#the-option-element>option</a></code> element in the <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> whose
+  <a href=#concept-option-index title=concept-option-index>index</a> is the given new
+  value, if any, must have its <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> set to
+  true.</p>
+
+  <p>The <dfn id=dom-select-value title=dom-select-value><code>value</code></dfn> DOM
+  attribute, on getting, must return the <a href=#concept-option-value title=concept-option-value>value</a> of the first
+  <code><a href=#the-option-element>option</a></code> element in the <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> in
+  <a href=#tree-order>tree order</a> that has its <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> set to true,
+  if any. If there isn't one, then it must return the empty
+  string.</p>
+
+  <p>On setting, the <code title=dom-select-value><a href=#dom-select-value>value</a></code>
+  attribute must set the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> of all the
+  <code><a href=#the-option-element>option</a></code> elements in the <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> to false,
+  and then first the <code><a href=#the-option-element>option</a></code> element in the <a href=#concept-select-option-list title=concept-select-option-list>list of options</a>, in
+  <a href=#tree-order>tree order</a>, whose <a href=#concept-option-value title=concept-option-value>value</a> is equal to the given new
+  value, if any, must have its <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> set to
+  true.</p>
+
   <p>The <dfn id=dom-select-multiple title=dom-select-multiple><code>multiple</code></dfn>
   and <dfn id=dom-select-size title=dom-select-size><code>size</code></dfn> DOM
   attributes must <a href=#reflect>reflect</a> the respective content
@@ -26545,6 +26573,8 @@
 
   <p class=XXX>... <dfn id=concept-option-disabled title=concept-option-disabled>disabled</dfn></p>
 
+  <p class=XXX>... <dfn id=concept-option-index title=concept-option-index>index</dfn></p>
+
   <p class=XXX>
    <dfn id=dom-option title=dom-option><code>Option()</code></dfn>
    <dfn id=dom-option-n title=dom-option-n><code>Option(<var title="">name</var>)</code></dfn>

Modified: source
===================================================================
--- source	2008-10-07 21:06:35 UTC (rev 2292)
+++ source	2008-10-07 21:21:13 UTC (rev 2293)
@@ -29590,14 +29590,61 @@
 
   <!-- XXX9 is blocked on WebIDL -->
 
-  <!--
-  XXX readonly attribute <span>HTMLOptionsCollection</span> <span title="dom-select-selectedOptions">selectedOptions</span>;
-  XXX          attribute long <span title="dom-select-selectedIndex">selectedIndex</span>;
-  XXX          attribute DOMString <span title="dom-select-value">value</span>;
-  -->
+  <p>The <dfn
+  title="dom-select-selectedOptions"><code>selectedOptions</code></dfn>
+  DOM attribute must return an <code>HTMLOptionsCollection</code>
+  rooted at the <code>select</code> node, whose filter matches the
+  elements in the <span title="concept-select-option-list">list of
+  options</span> that have their <span
+  title="concept-option-selectedness">selectedness</span> set to
+  true.</p>
 
-  <p class="XXX">...</p>
+  <p>The <dfn
+  title="dom-select-selectedIndex"><code>selectedIndex</code></dfn>
+  DOM attribute, on getting, must return the <span
+  title="concept-option-index">index</span> of the first
+  <code>option</code> element in the <span
+  title="concept-select-option-list">list of options</span> in
+  <span>tree order</span> that has its <span
+  title="concept-option-selectedness">selectedness</span> set to true,
+  if any. If there isn't one, then it must return -1.</p>
 
+  <p>On setting, the <code
+  title="dom-select-selectedIndex">selectedIndex</code> attribute must
+  set the <span
+  title="concept-option-selectedness">selectedness</span> of all the
+  <code>option</code> elements in the <span
+  title="concept-select-option-list">list of options</span> to false,
+  and then the <code>option</code> element in the <span
+  title="concept-select-option-list">list of options</span> whose
+  <span title="concept-option-index">index</span> is the given new
+  value, if any, must have its <span
+  title="concept-option-selectedness">selectedness</span> set to
+  true.</p>
+
+  <p>The <dfn title="dom-select-value"><code>value</code></dfn> DOM
+  attribute, on getting, must return the <span
+  title="concept-option-value">value</span> of the first
+  <code>option</code> element in the <span
+  title="concept-select-option-list">list of options</span> in
+  <span>tree order</span> that has its <span
+  title="concept-option-selectedness">selectedness</span> set to true,
+  if any. If there isn't one, then it must return the empty
+  string.</p>
+
+  <p>On setting, the <code title="dom-select-value">value</code>
+  attribute must set the <span
+  title="concept-option-selectedness">selectedness</span> of all the
+  <code>option</code> elements in the <span
+  title="concept-select-option-list">list of options</span> to false,
+  and then first the <code>option</code> element in the <span
+  title="concept-select-option-list">list of options</span>, in
+  <span>tree order</span>, whose <span
+  title="concept-option-value">value</span> is equal to the given new
+  value, if any, must have its <span
+  title="concept-option-selectedness">selectedness</span> set to
+  true.</p>
+
   <p>The <dfn title="dom-select-multiple"><code>multiple</code></dfn>
   and <dfn title="dom-select-size"><code>size</code></dfn> DOM
   attributes must <span>reflect</span> the respective content
@@ -29711,6 +29758,8 @@
 
   <p class="XXX">... <dfn title="concept-option-disabled">disabled</dfn></p>
 
+  <p class="XXX">... <dfn title="concept-option-index">index</dfn></p>
+
   <p class="XXX">
    <dfn title="dom-option"><code>Option()</code></dfn>
    <dfn title="dom-option-n"><code>Option(<var title="">name</var>)</code></dfn>




More information about the Commit-Watchers mailing list