[html5] r2298 - [] (0) WF2: <option>
whatwg at whatwg.org
whatwg at whatwg.org
Tue Oct 7 17:08:13 PDT 2008
Author: ianh
Date: 2008-10-07 17:08:12 -0700 (Tue, 07 Oct 2008)
New Revision: 2298
Modified:
index
source
Log:
[] (0) WF2: <option>
Modified: index
===================================================================
--- index 2008-10-07 23:05:11 UTC (rev 2297)
+++ index 2008-10-08 00:08:12 UTC (rev 2298)
@@ -16,7 +16,7 @@
<div class=head>
<p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
<h1>HTML 5</h1>
- <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 7 October 2008</h2>
+ <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 8 October 2008</h2>
<p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<dl><dt>Multiple-page version:</dt>
@@ -26438,14 +26438,31 @@
any other mechanism), and before the relevant user interaction event
is queued (e.g. before the <span title=event-click>click</span>
event), the user agent must set the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> of the
- picked <code><a href=#the-option-element>option</a></code> element to true, set the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> of all the
- other <code><a href=#the-option-element>option</a></code> element in its <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> to false,
- and then <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
- event</a> called <code title=event-change>change</code> at the
- <code><a href=#the-select-element>select</a></code> element, using the <a href=#user-interaction-task-source>user interaction task
- source</a> as the task source.</p>
+ picked <code><a href=#the-option-element>option</a></code> element to true and then <a href=#queue-a-task>queue a
+ task</a> to <a href=#fire-a-simple-event>fire a simple event</a> called <code title=event-change>change</code> at the <code><a href=#the-select-element>select</a></code>
+ element, using the <a href=#user-interaction-task-source>user interaction task source</a> as the
+ task source.</p>
<p>If the <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code>
+ attribute is absent, whenever an <code><a href=#the-option-element>option</a></code> element in the
+ <code><a href=#the-select-element>select</a></code> element's <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> has its
+ <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> set to
+ true, and whenever an <code><a href=#the-option-element>option</a></code> element with its <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> set to true
+ is added to the <code><a href=#the-select-element>select</a></code> element's <a href=#concept-select-option-list title=concept-select-option-list>list of options</a>, the user
+ agent must set the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> of all the
+ other <code><a href=#the-option-element>option</a></code> element in its <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> to
+ false.</p>
+
+ <p>If the <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code>
+ attribute is absent, whenever there are no <code><a href=#the-option-element>option</a></code>
+ elements in the <code><a href=#the-select-element>select</a></code> element's <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, the user agent must set the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</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 is not <a href=#concept-option-disabled title=concept-option-disabled>disabled</a>, if any, to
+ true.</p>
+
+ <p>If the <code title=attr-select-multiple><a href=#attr-select-multiple>multiple</a></code>
attribute is present, and the element is not <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a>, then the user agent
should allow the user to toggle the <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> of the
<code><a href=#the-option-element>option</a></code> elements in its <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> that are
@@ -26458,6 +26475,13 @@
<code><a href=#the-select-element>select</a></code> element, using the <a href=#user-interaction-task-source>user interaction task
source</a> as the task source.</p>
+ <p>The <a href=#concept-form-reset-control title=concept-form-reset-control>reset
+ algorithm</a> for <code><a href=#the-select-element>select</a></code> elements is to go through
+ all the <code><a href=#the-option-element>option</a></code> elements in the element's <a href=#concept-select-option-list title=concept-select-option-list>list of options</a>, and set
+ their <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a>
+ to true if the <code><a href=#the-option-element>option</a></code> element has a <code title=attr-option-selected><a href=#attr-option-selected>selected</a></code> attribute, and false
+ otherwise.</p>
+
<p>The <code title=attr-fae-form><a href=#attr-fae-form>form</a></code> attribute is used to
explicitly associate the <code><a href=#the-select-element>select</a></code> element with its
<a href=#form-owner>form owner</a>. The <code title=attr-fe-name><a href=#attr-fe-name>name</a></code>
@@ -26631,39 +26655,86 @@
<dt>Content model:</dt>
<dd>Text.</dd>
<dt>Element-specific attributes:</dt>
- <dd><code title=attr-option-disabled>disabled</code></dd>
- <dd><code title=attr-option-label>label</code></dd>
- <dd><code title=attr-option-selected>selected</code></dd>
- <dd><code title=attr-option-value>value</code></dd>
+ <dd><code title=attr-option-disabled><a href=#attr-option-disabled>disabled</a></code></dd>
+ <dd><code title=attr-option-label><a href=#attr-option-label>label</a></code></dd>
+ <dd><code title=attr-option-selected><a href=#attr-option-selected>selected</a></code></dd>
+ <dd><code title=attr-option-value><a href=#attr-option-value>value</a></code></dd>
<dt>DOM interface:</dt>
<dd>
<pre class=idl>[<a href=#dom-option title=dom-option>Constructor</a>(),
<a href=#dom-option-n title=dom-option-n>Constructor</a>(in DOMString name),
<a href=#dom-option-nv title=dom-option-nv>Constructor</a>(in DOMString name, in DOMString value)]
interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmlelement>HTMLElement</a> {
- attribute boolean <span title=dom-option-disabled>disabled</span>;
+ attribute boolean <a href=#dom-option-disabled title=dom-option-disabled>disabled</a>;
readonly attribute <a href=#htmlformelement>HTMLFormElement</a> <span title=dom-option-form>form</span>;
- attribute DOMString <span title=dom-option-label>label</span>;
- attribute boolean <span title=dom-option-defaultSelected>defaultSelected</span>;
- attribute boolean <span title=dom-option-selected>selected</span>;
- attribute DOMString <a href=#dom-input-value title=dom-input-value>value</a>;
+ attribute DOMString <a href=#dom-option-label title=dom-option-label>label</a>;
+ attribute boolean <a href=#dom-option-defaultselected title=dom-option-defaultSelected>defaultSelected</a>;
+ attribute boolean <a href=#dom-option-selected title=dom-option-selected>selected</a>;
+ attribute DOMString <a href=#dom-option-value title=dom-option-value>value</a>;
- readonly attribute DOMString <span title=dom-option-text>text</span>;
- readonly attribute long <span title=dom-option-index>index</span>;
+ readonly attribute DOMString <a href=#dom-option-text title=dom-option-text>text</a>;
+ readonly attribute long <a href=#dom-option-index title=dom-option-index>index</a>;
};</pre>
</dd>
- </dl><p class=XXX>...</p>
+ </dl><p>The <code><a href=#the-option-element>option</a></code> element represents an option in a
+ <code><a href=#the-select-element>select</a></code> element or as part of a list of suggestions in a
+ <code><a href=#the-datalist-element>datalist</a></code> element.</p>
- <p class=XXX>... <dfn id=concept-option-selectedness title=concept-option-selectedness>selectedness</dfn></p>
+ <p>The <dfn id=attr-option-disabled title=attr-option-disabled><code>disabled</code></dfn>
+ attribute is a <a href=#boolean-attribute>boolean attribute</a>.</p>
- <p class=XXX>... <dfn id=concept-option-value title=concept-option-value>value</dfn></p>
+ <p>An <code><a href=#the-option-element>option</a></code> element is <dfn id=concept-option-disabled title=concept-option-disabled>disabled</dfn> if its <code title=attr-option-disabled><a href=#attr-option-disabled>disabled</a></code> is present or if it is
+ a child of an <code><a href=#the-optgroup-element>optgroup</a></code> element whose <code title=attr-optgroup-disabled><a href=#attr-optgroup-disabled>disabled</a></code> attribute is
+ present.</p>
- <p class=XXX>... <dfn id=concept-option-label title=concept-option-label>label</dfn></p>
+ <p>The <dfn id=attr-option-label title=attr-option-label><code>label</code></dfn>
+ attribute provides a label for element. The <dfn id=concept-option-label title=concept-option-label>label</dfn> of an <code><a href=#the-option-element>option</a></code>
+ element is the value of the <code title=attr-option-label><a href=#attr-option-label>label</a></code> attribute, if there is one,
+ or the <code><a href=#textcontent>textContent</a></code> of the element, if there isn't.</p>
- <p class=XXX>... <dfn id=concept-option-disabled title=concept-option-disabled>disabled</dfn></p>
+ <p>The <dfn id=attr-option-value title=attr-option-value><code>value</code></dfn>
+ attribute provides a value for element. The <dfn id=concept-option-value title=concept-option-value>value</dfn> of an <code><a href=#the-option-element>option</a></code>
+ element is the value of the <code title=attr-option-value><a href=#attr-option-value>value</a></code> attribute, if there is one,
+ or the <code><a href=#textcontent>textContent</a></code> of the element, if there isn't.</p>
- <p class=XXX>... <dfn id=concept-option-index title=concept-option-index>index</dfn></p>
+ <p>The <dfn id=attr-option-selected title=attr-option-selected><code>selected</code></dfn>
+ attribute represents the default <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> of the
+ element.</p>
+ <p>The <dfn id=concept-option-selectedness title=concept-option-selectedness>selectedness</dfn>
+ of an <code><a href=#the-option-element>option</a></code> element is a boolean state, initially
+ false. If the element is <a href=#concept-option-disabled title=concept-option-disabled>disabled</a>, then the element's
+ <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> is
+ always false and cannot be set to true. When the element is created,
+ its <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a>
+ must be set to true if the element has a <code title=attr-option-selected><a href=#attr-option-selected>selected</a></code> attribute. Whenever an
+ <code><a href=#the-option-element>option</a></code> element's <code title=attr-option-selected><a href=#attr-option-selected>selected</a></code> attribute is added, its
+ <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> must
+ be set to true.</p>
+
+ <p>An <code><a href=#the-option-element>option</a></code> element's <dfn id=concept-option-index title=concept-option-index>index</dfn> is the number of
+ <code><a href=#the-option-element>option</a></code> element that are in the same <a href=#concept-select-option-list title=concept-select-option-list>list of options</a> but that
+ come before it in <a href=#tree-order>tree order</a>. If the
+ <code><a href=#the-option-element>option</a></code> element is not in a <a href=#concept-select-option-list title=concept-select-option-list>list of options</a>, then the
+ <code><a href=#the-option-element>option</a></code> element's <a href=#concept-option-index title=concept-option-index>index</a> is zero.</p>
+
+ <p>The <dfn id=dom-option-disabled title=dom-option-disabled><code>disabled</code></dfn>,
+ <dfn id=dom-option-label title=dom-option-label><code>label</code></dfn>, and <dfn id=dom-option-value title=dom-option-value><code>value</code></dfn> DOM attributes
+ must <a href=#reflect>reflect</a> the respective content attributes of the
+ same name. The <dfn id=dom-option-defaultselected title=dom-option-defaultSelected><code>defaultSelected</code></dfn>
+ DOM attribute must <a href=#reflect>reflect</a> the <code title=attr-option-selected><a href=#attr-option-selected>selected</a></code> content attribute.</p>
+
+ <p>The <dfn id=dom-option-selected title=dom-option-selected><code>selected</code></dfn>
+ DOM attribute must return true if the element's <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> is true, and
+ false otherwise.</p>
+
+ <p>The <dfn id=dom-option-index title=dom-option-index><code>index</code></dfn> DOM
+ attribute must return the lement's <a href=#concept-option-index title=concept-option-index>index</a>.</p>
+
+ <p>The <dfn id=dom-option-text title=dom-option-text><code>text</code></dfn> DOM
+ attribute must return the same value as the <code><a href=#textcontent>textContent</a></code>
+ DOM attribute on the element.</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>
@@ -28392,7 +28463,7 @@
</ul><p>The <code title=dom-provider-getCellData><a href=#dom-provider-getcelldata>getCellData(<var title="">row</var>, <var title="">cell</var>)</a></code> method must
return the value of the <code title=attr-optgroup-label><a href=#attr-optgroup-label>label</a></code> attribute if the <var title="">row</var>'s corresponding element is an
<code><a href=#the-optgroup-element>optgroup</a></code> element, otherwise, if the <var title="">row</var>'s corresponding element is an
- <code><a href=#the-option-element>option</a></code>element, its <code title=attr-option-label>label</code> attribute if it has one,
+ <code><a href=#the-option-element>option</a></code>element, its <code title=attr-option-label><a href=#attr-option-label>label</a></code> attribute if it has one,
otherwise the value of its <code><a href=#textcontent>textContent</a></code> DOM
attribute.</p>
@@ -28572,7 +28643,7 @@
<p>The <code title=dom-provider-getCellData><a href=#dom-provider-getcelldata>getCellData()</a></code>
method must return the <code><a href=#textcontent>textContent</a></code> of the current
- <code><a href=#the-option-element>option</a></code> element (the <code title=attr-option-label>label</code> attribute is <a href=#ignore title=ignore>ignored</a> in this context as the
+ <code><a href=#the-option-element>option</a></code> element (the <code title=attr-option-label><a href=#attr-option-label>label</a></code> attribute is <a href=#ignore title=ignore>ignored</a> in this context as the
<code><a href=#the-optgroup-element>optgroup</a></code>s are not displayed).</p>
<p>The <code title=dom-provider-getCellClasses><a href=#dom-provider-getcellclasses>getCellClasses()</a></code> method
@@ -29828,8 +29899,8 @@
<dt>An <code><a href=#the-hr-element>hr</a></code> element</dt>
- <dt>An <code><a href=#the-option-element>option</a></code> element that has a <code title=attr-option-value>value</code> attribute set to the empty
- string, and has a <code title=attr-option-disabled>disabled</code> attribute, and whose
+ <dt>An <code><a href=#the-option-element>option</a></code> element that has a <code title=attr-option-value><a href=#attr-option-value>value</a></code> attribute set to the empty
+ string, and has a <code title=attr-option-disabled><a href=#attr-option-disabled>disabled</a></code> attribute, and whose
<code><a href=#textcontent>textContent</a></code> consists of a string of one or more
hyphens (U+002D HYPHEN-MINUS)</dt>
@@ -30214,7 +30285,7 @@
<p>Otherwise, the <a href=#command-facet-type title=command-facet-Type>Type</a> is
"radio" or "checkbox". If the element is a <a href=#labeled-control>labeled
- control</a>, the <code title="">textContent</code> of the first
+ control</a>, the <code><a href=#textcontent>textContent</a></code> of the first
<code><a href=#the-label-element>label</a></code> element in <a href=#tree-order>tree order</a> whose
<a href=#labeled-control>labeled control</a> is the element in question is the <a href=#command-facet-label title=command-facet-Label>Label</a> (in DOM terms, this the
string given by <code><var title="">element</var>.labels[0].textContent</code>). Otherwise,
@@ -30252,7 +30323,7 @@
<h5 id=using-the-option-element-to-define-a-command><span class=secno>4.11.6.4 </span><dfn title=option-command>Using the <code>option</code> element to define a command</dfn></h5>
<p>An <code><a href=#the-option-element>option</a></code> element with an ancestor
- <code><a href=#the-select-element>select</a></code> element and either no <code title=attr-option-value>value</code> attribute or a <code title=attr-option-value>value</code> attribute that is not the
+ <code><a href=#the-select-element>select</a></code> element and either no <code title=attr-option-value><a href=#attr-option-value>value</a></code> attribute or a <code title=attr-option-value><a href=#attr-option-value>value</a></code> attribute that is not the
empty string <a href=#concept-command title=concept-command>defines a
command</a>.</p>
@@ -30267,7 +30338,7 @@
command is an <a href=#anonymous-command>anonymous command</a>.</p>
<p>The <a href=#command-facet-label title=command-facet-Label>Label</a> of the command
- is the value of the <code><a href=#the-option-element>option</a></code> element's <code title=attr-option-label>label</code> attribute, if there is one,
+ is the value of the <code><a href=#the-option-element>option</a></code> element's <code title=attr-option-label><a href=#attr-option-label>label</a></code> attribute, if there is one,
or the value of the <code><a href=#the-option-element>option</a></code> element's
<code><a href=#textcontent>textContent</a></code> DOM attribute if it doesn't.</p>
@@ -30284,18 +30355,18 @@
<p>The <a href=#command-facet-disabledstate title=command-facet-DisabledState>Disabled
State</a> of the command is true (disabled) if the element has a
- <code title=attr-option-disabled>disabled</code> attribute, and
+ <code title=attr-option-disabled><a href=#attr-option-disabled>disabled</a></code> attribute, and
false otherwise.</p>
<p>The <a href=#command-facet-checkedstate title=command-facet-CheckedState>Checked State</a>
- of the command is true (checked) if the element's <code title=dom-option-selected>selected</code> DOM attribute is true,
+ of the command is true (checked) if the element's <code title=dom-option-selected><a href=#dom-option-selected>selected</a></code> DOM attribute is true,
and false otherwise.</p>
<p>The <a href=#command-facet-action title=command-facet-Action>Action</a> of the
command depends on its <a href=#command-facet-type title=command-facet-Type>Type</a>. If the command is of <a href=#command-facet-type title=command-facet-Type>Type</a> "radio" then this must set
- the <code title=dom-option-selected>selected</code> DOM attribute
+ the <code title=dom-option-selected><a href=#dom-option-selected>selected</a></code> DOM attribute
of the <code><a href=#the-option-element>option</a></code> element to true, otherwise it must toggle
- the state of the <code title=dom-option-selected>selected</code>
+ the state of the <code title=dom-option-selected><a href=#dom-option-selected>selected</a></code>
DOM attribute (set it to true if it is false and vice versa). Then
<a href=#fire-a-change-event title="fire a change event">a <code title="">change</code>
event must be fired</a> on the <code><a href=#the-option-element>option</a></code> element's
@@ -39466,8 +39537,8 @@
updating the <code title=dom-input-defaultValue><a href=#dom-input-defaultvalue>defaultValue</a></code> DOM attribute as
well as the <code title=dom-input-value><a href=#dom-input-value>value</a></code> DOM
attribute; for <code><a href=#the-select-element>select</a></code> elements it means updating the
- <code><a href=#the-option-element>option</a></code> elements' <code title=dom-option-defaultSelected>defaultSelected</code> DOM
- attribute as well as the <code title=dom-option-selected>selected</code> DOM attribute; for
+ <code><a href=#the-option-element>option</a></code> elements' <code title=dom-option-defaultSelected><a href=#dom-option-defaultselected>defaultSelected</a></code> DOM
+ attribute as well as the <code title=dom-option-selected><a href=#dom-option-selected>selected</a></code> DOM attribute; for
<code><a href=#the-textarea-element>textarea</a></code> elements this means updating the <code title=dom-textarea-defaultValue>defaultValue</code> DOM attribute
as well as the <code title=dom-textarea-value>value</code> DOM
attribute. (Updating the <code title="">default*</code> DOM
Modified: source
===================================================================
--- source 2008-10-07 23:05:11 UTC (rev 2297)
+++ source 2008-10-08 00:08:12 UTC (rev 2298)
@@ -29592,16 +29592,41 @@
is queued (e.g. before the <span title="event-click">click</span>
event), the user agent must set the <span
title="concept-option-selectedness">selectedness</span> of the
- picked <code>option</code> element to true, set the <span
+ picked <code>option</code> element to true and then <span>queue a
+ task</span> to <span>fire a simple event</span> called <code
+ title="event-change">change</code> at the <code>select</code>
+ element, using the <span>user interaction task source</span> as the
+ task source.</p>
+
+ <p>If the <code title="attr-select-multiple">multiple</code>
+ attribute is absent, whenever an <code>option</code> element in the
+ <code>select</code> element's <span
+ title="concept-select-option-list">list of options</span> has its
+ <span title="concept-option-selectedness">selectedness</span> set to
+ true, and whenever an <code>option</code> element with its <span
+ title="concept-option-selectedness">selectedness</span> set to true
+ is added to the <code>select</code> element's <span
+ title="concept-select-option-list">list of options</span>, the user
+ agent must set the <span
title="concept-option-selectedness">selectedness</span> of all the
other <code>option</code> element in its <span
- title="concept-select-option-list">list of options</span> to false,
- and then <span>queue a task</span> to <span>fire a simple
- event</span> called <code title="event-change">change</code> at the
- <code>select</code> element, using the <span>user interaction task
- source</span> as the task source.</p>
+ title="concept-select-option-list">list of options</span> to
+ false.</p>
<p>If the <code title="attr-select-multiple">multiple</code>
+ attribute is absent, whenever there are no <code>option</code>
+ elements in the <code>select</code> element's <span
+ title="concept-select-option-list">list of options</span> that have
+ their <span title="concept-option-selectedness">selectedness</span>
+ set to true, the user agent must set the <span
+ title="concept-option-selectedness">selectedness</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 is not <span
+ title="concept-option-disabled">disabled</span>, if any, to
+ true.</p>
+
+ <p>If the <code title="attr-select-multiple">multiple</code>
attribute is present, and the element is not <span
title="concept-fe-disabled">disabled</span>, then the user agent
should allow the user to toggle the <span
@@ -29619,6 +29644,15 @@
<code>select</code> element, using the <span>user interaction task
source</span> as the task source.</p>
+ <p>The <span title="concept-form-reset-control">reset
+ algorithm</span> for <code>select</code> elements is to go through
+ all the <code>option</code> elements in the element's <span
+ title="concept-select-option-list">list of options</span>, and set
+ their <span title="concept-option-selectedness">selectedness</span>
+ to true if the <code>option</code> element has a <code
+ title="attr-option-selected">selected</code> attribute, and false
+ otherwise.</p>
+
<p>The <code title="attr-fae-form">form</code> attribute is used to
explicitly associate the <code>select</code> element with its
<span>form owner</span>. The <code title="attr-fe-name">name</code>
@@ -29850,7 +29884,7 @@
attribute DOMString <span title="dom-option-label">label</span>;
attribute boolean <span title="dom-option-defaultSelected">defaultSelected</span>;
attribute boolean <span title="dom-option-selected">selected</span>;
- attribute DOMString <span title="dom-input-value">value</span>;
+ attribute DOMString <span title="dom-option-value">value</span>;
readonly attribute DOMString <span title="dom-option-text">text</span>;
readonly attribute long <span title="dom-option-index">index</span>;
@@ -29858,18 +29892,85 @@
</dd>
</dl>
- <p class="XXX">...</p>
+ <p>The <code>option</code> element represents an option in a
+ <code>select</code> element or as part of a list of suggestions in a
+ <code>datalist</code> element.</p>
- <p class="XXX">... <dfn title="concept-option-selectedness">selectedness</dfn></p>
+ <p>The <dfn title="attr-option-disabled"><code>disabled</code></dfn>
+ attribute is a <span>boolean attribute</span>.</p>
- <p class="XXX">... <dfn title="concept-option-value">value</dfn></p>
+ <p>An <code>option</code> element is <dfn
+ title="concept-option-disabled">disabled</dfn> if its <code
+ title="attr-option-disabled">disabled</code> is present or if it is
+ a child of an <code>optgroup</code> element whose <code
+ title="attr-optgroup-disabled">disabled</code> attribute is
+ present.</p>
- <p class="XXX">... <dfn title="concept-option-label">label</dfn></p>
+ <p>The <dfn title="attr-option-label"><code>label</code></dfn>
+ attribute provides a label for element. The <dfn
+ title="concept-option-label">label</dfn> of an <code>option</code>
+ element is the value of the <code
+ title="attr-option-label">label</code> attribute, if there is one,
+ or the <code>textContent</code> of the element, if there isn't.</p>
- <p class="XXX">... <dfn title="concept-option-disabled">disabled</dfn></p>
+ <p>The <dfn title="attr-option-value"><code>value</code></dfn>
+ attribute provides a value for element. The <dfn
+ title="concept-option-value">value</dfn> of an <code>option</code>
+ element is the value of the <code
+ title="attr-option-value">value</code> attribute, if there is one,
+ or the <code>textContent</code> of the element, if there isn't.</p>
- <p class="XXX">... <dfn title="concept-option-index">index</dfn></p>
+ <p>The <dfn title="attr-option-selected"><code>selected</code></dfn>
+ attribute represents the default <span
+ title="concept-option-selectedness">selectedness</span> of the
+ element.</p>
+ <p>The <dfn title="concept-option-selectedness">selectedness</dfn>
+ of an <code>option</code> element is a boolean state, initially
+ false. If the element is <span
+ title="concept-option-disabled">disabled</span>, then the element's
+ <span title="concept-option-selectedness">selectedness</span> is
+ always false and cannot be set to true. When the element is created,
+ its <span title="concept-option-selectedness">selectedness</span>
+ must be set to true if the element has a <code
+ title="attr-option-selected">selected</code> attribute. Whenever an
+ <code>option</code> element's <code
+ title="attr-option-selected">selected</code> attribute is added, its
+ <span title="concept-option-selectedness">selectedness</span> must
+ be set to true.</p>
+
+ <p>An <code>option</code> element's <dfn
+ title="concept-option-index">index</dfn> is the number of
+ <code>option</code> element that are in the same <span
+ title="concept-select-option-list">list of options</span> but that
+ come before it in <span>tree order</span>. If the
+ <code>option</code> element is not in a <span
+ title="concept-select-option-list">list of options</span>, then the
+ <code>option</code> element's <span
+ title="concept-option-index">index</span> is zero.</p>
+
+ <p>The <dfn title="dom-option-disabled"><code>disabled</code></dfn>,
+ <dfn title="dom-option-label"><code>label</code></dfn>, and <dfn
+ title="dom-option-value"><code>value</code></dfn> DOM attributes
+ must <span>reflect</span> the respective content attributes of the
+ same name. The <dfn
+ title="dom-option-defaultSelected"><code>defaultSelected</code></dfn>
+ DOM attribute must <span>reflect</span> the <code
+ title="attr-option-selected">selected</code> content attribute.</p>
+
+ <p>The <dfn title="dom-option-selected"><code>selected</code></dfn>
+ DOM attribute must return true if the element's <span
+ title="concept-option-selectedness">selectedness</span> is true, and
+ false otherwise.</p>
+
+ <p>The <dfn title="dom-option-index"><code>index</code></dfn> DOM
+ attribute must return the lement's <span
+ title="concept-option-index">index</span>.</p>
+
+ <p>The <dfn title="dom-option-text"><code>text</code></dfn> DOM
+ attribute must return the same value as the <code>textContent</code>
+ DOM attribute on the element.</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>
@@ -34173,7 +34274,7 @@
<p>Otherwise, the <span title="command-facet-Type">Type</span> is
"radio" or "checkbox". If the element is a <span>labeled
- control</span>, the <code title="">textContent</code> of the first
+ control</span>, the <code>textContent</code> of the first
<code>label</code> element in <span>tree order</span> whose
<span>labeled control</span> is the element in question is the <span
title="command-facet-Label">Label</span> (in DOM terms, this the
More information about the Commit-Watchers
mailing list