[html5] r2212 - [] (0) WF2: Define input.valueAsDate and input.valueAsNumber for the cases where [...]
whatwg at whatwg.org
whatwg at whatwg.org
Wed Sep 17 17:42:04 PDT 2008
Author: ianh
Date: 2008-09-17 17:42:00 -0700 (Wed, 17 Sep 2008)
New Revision: 2212
Modified:
index
source
Log:
[] (0) WF2: Define input.valueAsDate and input.valueAsNumber for the cases where they don't apply.
Modified: index
===================================================================
--- index 2008-09-18 00:21:27 UTC (rev 2211)
+++ index 2008-09-18 00:42:00 UTC (rev 2212)
@@ -1113,6 +1113,13 @@
<li><a href="#common5"><span class=secno>4.9.4.3. </span>Common
<code>input</code> element APIs</a>
+ <ul class=toc>
+ <li><a href="#value"><span class=secno>4.9.4.3.1. </span>Value
+ manipulation</a>
+
+ <li><a href="#others..."><span class=secno>4.9.4.3.2.
+ </span>Others...</a>
+ </ul>
</ul>
<li><a href="#the-button"><span class=secno>4.9.5 </span>The
@@ -12661,12 +12668,12 @@
href="#ol">ol</a></code> element's <code title=attr-ol-start><a
href="#start0">start</a></code> attribute, unless that <code><a
href="#li">li</a></code> element has a <code title=attr-li-value><a
- href="#value">value</a></code> attribute with a value that can be
+ href="#value0">value</a></code> attribute with a value that can be
successfully parsed, in which case it has the ordinal value given by that
- <code title=attr-li-value><a href="#value">value</a></code> attribute.
+ <code title=attr-li-value><a href="#value0">value</a></code> attribute.
<p>Each subsequent item in the list has the ordinal value given by its
- <code title=attr-li-value><a href="#value">value</a></code> attribute, if
+ <code title=attr-li-value><a href="#value0">value</a></code> attribute, if
it has one, or, if it doesn't, the ordinal value of the previous item,
plus one if the <code title=attr-ol-reversed><a
href="#reversed">reversed</a></code> is absent, or minus one if it is
@@ -12807,7 +12814,7 @@
<dt>Element-specific attributes:
<dd>If the element is a child of an <code><a href="#ol">ol</a></code>
- element: <code title=attr-li-value><a href="#value">value</a></code>
+ element: <code title=attr-li-value><a href="#value0">value</a></code>
<dd>If the element is not the child of an <code><a
href="#ol">ol</a></code> element: None.
@@ -12817,7 +12824,7 @@
<dd>
<pre
class=idl>interface <dfn id=htmllielement>HTMLLIElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
- attribute long <a href="#value0" title=dom-li-value>value</a>;
+ attribute long <a href="#value1" title=dom-li-value>value</a>;
};</pre>
</dl>
@@ -12829,25 +12836,25 @@
list-related relationship to any other <code><a href="#li">li</a></code>
element.
- <p>The <dfn id=value title=attr-li-value><code>value</code></dfn>
+ <p>The <dfn id=value0 title=attr-li-value><code>value</code></dfn>
attribute, if present, must be a <a href="#valid0">valid integer</a>
giving the ordinal value of the list item.
- <p>If the <code title=attr-li-value><a href="#value">value</a></code>
+ <p>If the <code title=attr-li-value><a href="#value0">value</a></code>
attribute is present, user agents must <a href="#rules0" title="rules for
parsing integers">parse it as an integer</a>, in order to determine the
attribute's value. If the attribute's value cannot be converted to a
number, the attribute must be treated as if it was absent. The attribute
has no default value.
- <p>The <code title=attr-li-value><a href="#value">value</a></code>
+ <p>The <code title=attr-li-value><a href="#value0">value</a></code>
attribute is processed relative to the element's parent <code><a
href="#ol">ol</a></code> element (q.v.), if there is one. If there is not,
the attribute has no effect.
- <p>The <dfn id=value0 title=dom-li-value><code>value</code></dfn> DOM
+ <p>The <dfn id=value1 title=dom-li-value><code>value</code></dfn> DOM
attribute must <a href="#reflect">reflect</a> the value of the <code
- title=dom-li-value><a href="#value0">value</a></code> content attribute.
+ title=dom-li-value><a href="#value1">value</a></code> content attribute.
<div class=example>
<p>The following example, the top ten movies are listed (in reverse
@@ -14265,7 +14272,7 @@
<dt>Element-specific attributes:
- <dd><code title=attr-progress-value><a href="#value1">value</a></code>
+ <dd><code title=attr-progress-value><a href="#value2">value</a></code>
<dd><code title=attr-progress-max><a href="#max">max</a></code>
@@ -14274,7 +14281,7 @@
<dd>
<pre
class=idl>interface <dfn id=htmlprogresselement>HTMLProgressElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
- attribute float <a href="#value2" title=dom-progress-value>value</a>;
+ attribute float <a href="#value3" title=dom-progress-value>value</a>;
attribute float <a href="#max0" title=dom-progress-max>max</a>;
readonly attribute float <a href="#position" title=dom-progress-position>position</a>;
};</pre>
@@ -14291,7 +14298,7 @@
<p>There are two attributes that determine the current task completion
represented by the element.
- <p>The <dfn id=value1 title=attr-progress-value><code>value</code></dfn>
+ <p>The <dfn id=value2 title=attr-progress-value><code>value</code></dfn>
attribute specifies how much of the task has been completed, and the <dfn
id=max title=attr-progress-max><code>max</code></dfn> attribute specifies
how much work the task requires in total. The units are arbitrary and not
@@ -14322,12 +14329,12 @@
<p><strong>Author requirements</strong>: The <code
title=attr-progress-max><a href="#max">max</a></code> and <code
- title=attr-progress-value><a href="#value1">value</a></code> attributes,
+ title=attr-progress-value><a href="#value2">value</a></code> attributes,
when present, must have values that are <a href="#valid1" title="valid
floating point number">valid floating point numbers</a>. The <code
title=attr-progress-max><a href="#max">max</a></code> attribute, if
present, must have a value greater than zero. The <code
- title=attr-progress-value><a href="#value1">value</a></code> attribute, if
+ title=attr-progress-value><a href="#value2">value</a></code> attribute, if
present, must have a value equal to or greater than zero, and less than or
equal to the value of the <code title=attr-progress-max><a
href="#max">max</a></code> attribute, if present.
@@ -14341,12 +14348,12 @@
<p><strong>User agent requirements</strong>: User agents must parse the
<code title=attr-progress-max><a href="#max">max</a></code> and <code
- title=attr-progress-value><a href="#value1">value</a></code> attributes'
+ title=attr-progress-value><a href="#value2">value</a></code> attributes'
values according to the <a href="#rules1">rules for parsing floating point
number values</a>.
<p>If the <code title=attr-progress-value><a
- href="#value1">value</a></code> attribute is omitted, then user agents
+ href="#value2">value</a></code> attribute is omitted, then user agents
must also parse the <code><a href="#textcontent">textContent</a></code> of
the <code><a href="#progress">progress</a></code> element in question
using the <a href="#steps">steps for finding one or two numbers of a ratio
@@ -14361,7 +14368,7 @@
<ol>
<li>If the <code title=attr-progress-max><a href="#max">max</a></code>
attribute is omitted, and the <code title=attr-progress-value><a
- href="#value1">value</a></code> is omitted, and the results of parsing
+ href="#value2">value</a></code> is omitted, and the results of parsing
the <code><a href="#textcontent">textContent</a></code> was nothing, then
the progress bar is an indeterminate progress bar. Abort these steps.
@@ -14373,7 +14380,7 @@
<li>Otherwise, if the <code title=attr-progress-max><a
href="#max">max</a></code> attribute is absent but the <code
- title=attr-progress-value><a href="#value1">value</a></code> attribute is
+ title=attr-progress-value><a href="#value2">value</a></code> attribute is
present, or, if the <code title=attr-progress-max><a
href="#max">max</a></code> attribute is present but no value could be
parsed from it, then the maximum is 1.
@@ -14388,19 +14395,19 @@
value is 1.
<li>If the <code title=attr-progress-value><a
- href="#value1">value</a></code> attribute is present on the element and a
+ href="#value2">value</a></code> attribute is present on the element and a
value could be parsed out of it, that value is the current value of the
progress bar. Otherwise, if the attribute is present but no value could
be parsed from it, the current value is zero.
<li>Otherwise if the <code title=attr-progress-value><a
- href="#value1">value</a></code> attribute is absent and the <code
+ href="#value2">value</a></code> attribute is absent and the <code
title=attr-progress-max><a href="#max">max</a></code> attribute is
present, then, if the <code><a href="#textcontent">textContent</a></code>
was parsed and found to contain just one number, with no associated
denominator punctuation character, then the current value is that number.
Otherwise, if the <code title=attr-progress-value><a
- href="#value1">value</a></code> attribute is absent and the <code
+ href="#value2">value</a></code> attribute is absent and the <code
title=attr-progress-max><a href="#max">max</a></code> attribute is
present then the current value is zero.
@@ -14424,14 +14431,14 @@
relative position of the current value relative to the maximum value.
<p>The <dfn id=max0 title=dom-progress-max><code>max</code></dfn> and <dfn
- id=value2 title=dom-progress-value><code>value</code></dfn> DOM attributes
+ id=value3 title=dom-progress-value><code>value</code></dfn> DOM attributes
must <a href="#reflect">reflect</a> the elements' content attributes of
the same name. When the relevant content attributes are absent, the DOM
attributes must return zero. The value parsed from the <code><a
href="#textcontent">textContent</a></code> never affects the DOM values.
<p class=big-issue>Would be cool to have the <code
- title=dom-progress-value><a href="#value2">value</a></code> DOM attribute
+ title=dom-progress-value><a href="#value3">value</a></code> DOM attribute
update the <code><a href="#textcontent">textContent</a></code> in-line...
<p>If the progress bar is an indeterminate progress bar, then the <dfn
@@ -14458,7 +14465,7 @@
<dt>Element-specific attributes:
- <dd><code title=attr-meter-value><a href="#value3">value</a></code>
+ <dd><code title=attr-meter-value><a href="#value4">value</a></code>
<dd><code title=attr-meter-min><a href="#min">min</a></code>
@@ -14475,7 +14482,7 @@
<dd>
<pre
class=idl>interface <dfn id=htmlmeterelement>HTMLMeterElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
- attribute float <a href="#value4" title=dom-meter-value>value</a>;
+ attribute float <a href="#value5" title=dom-meter-value>value</a>;
attribute float <a href="#min0" title=dom-meter-min>min</a>;
attribute float <a href="#max2" title=dom-meter-max>max</a>;
attribute float <a href="#low0" title=dom-meter-low>low</a>;
@@ -14507,7 +14514,7 @@
<p>The <dfn id=min title=attr-meter-min><code>min</code></dfn> attribute
specifies the lower bound of the range, and the <dfn id=max1
title=attr-meter-max><code>max</code></dfn> attribute specifies the upper
- bound. The <dfn id=value3 title=attr-meter-value><code>value</code></dfn>
+ bound. The <dfn id=value4 title=attr-meter-value><code>value</code></dfn>
attribute specifies the value to have the gauge indicate as the "measured"
value.
@@ -14531,7 +14538,7 @@
current value, and the minimum is assumed to be zero), or as a percentage
or similar (using one of the characters such as "%"), or as a fraction.
- <p>The <code title=attr-meter-value><a href="#value3">value</a></code>,
+ <p>The <code title=attr-meter-value><a href="#value4">value</a></code>,
<code title=attr-meter-min><a href="#min">min</a></code>, <code
title=attr-meter-low><a href="#low">low</a></code>, <code
title=attr-meter-high><a href="#high">high</a></code>, <code
@@ -14543,7 +14550,7 @@
<ul class=brief>
<li><code title=attr-meter-min><a href="#min">min</a></code> ≤ <code
- title=attr-meter-value><a href="#value3">value</a></code> ≤ <code
+ title=attr-meter-value><a href="#value4">value</a></code> ≤ <code
title=attr-meter-max><a href="#max1">max</a></code>
<li><code title=attr-meter-min><a href="#min">min</a></code> ≤ <code
@@ -14558,7 +14565,7 @@
<p>All <code><a href="#meter">meter</a></code> elements must have a value
specified somehow, either using the <code title=attr-meter-value><a
- href="#value3">value</a></code> attribute or by including a number in the
+ href="#value4">value</a></code> attribute or by including a number in the
contents of the element.
<p class=note>If no minimum or maximum is specified, then the range is
@@ -14613,14 +14620,14 @@
<p><strong>User agent requirements</strong>: User agents must parse the
<code title=attr-meter-min><a href="#min">min</a></code>, <code
title=attr-meter-max><a href="#max1">max</a></code>, <code
- title=attr-meter-value><a href="#value3">value</a></code>, <code
+ title=attr-meter-value><a href="#value4">value</a></code>, <code
title=attr-meter-low><a href="#low">low</a></code>, <code
title=attr-meter-high><a href="#high">high</a></code>, and <code
title=attr-meter-optimum><a href="#optimum">optimum</a></code> attributes
using the <a href="#rules1">rules for parsing floating point number
values</a>.
- <p>If the <code title=attr-meter-value><a href="#value3">value</a></code>
+ <p>If the <code title=attr-meter-value><a href="#value4">value</a></code>
attribute has been omitted, the user agent must also process the <code><a
href="#textcontent">textContent</a></code> of the element according to the
<a href="#steps">steps for finding one or two numbers of a ratio in a
@@ -14650,13 +14657,13 @@
href="#max1">max</a></code> attribute is specified but no value could be
parsed out of it, or if it was not specified, but either or both of the
<code title=attr-meter-min><a href="#min">min</a></code> or <code
- title=attr-meter-value><a href="#value3">value</a></code> attributes
+ title=attr-meter-value><a href="#value4">value</a></code> attributes
<em>were</em> specified, then the maximum value is 1.</p>
<p>Otherwise, none of the <code title=attr-meter-max><a
href="#max1">max</a></code>, <code title=attr-meter-min><a
href="#min">min</a></code>, and <code title=attr-meter-value><a
- href="#value3">value</a></code> attributes were specified. If the result
+ href="#value4">value</a></code> attributes were specified. If the result
of processing the <code><a href="#textcontent">textContent</a></code> of
the element was either nothing or just one number with no denominator
punctuation character, then the maximum value is 1; if the result was
@@ -14675,11 +14682,11 @@
<dt>The actual value
<dd>
- <p>If the <code title=attr-meter-value><a href="#value3">value</a></code>
+ <p>If the <code title=attr-meter-value><a href="#value4">value</a></code>
attribute is specified and a value could be parsed out of it, then that
value is the actual value.</p>
- <p>If the <code title=attr-meter-value><a href="#value3">value</a></code>
+ <p>If the <code title=attr-meter-value><a href="#value4">value</a></code>
attribute is not specified but the <code title=attr-meter-max><a
href="#max1">max</a></code> attribute <em>is</em> specified and the
result of processing the <code><a
@@ -14688,7 +14695,7 @@
is the actual value.</p>
<p>If neither of the <code title=attr-meter-value><a
- href="#value3">value</a></code> and <code title=attr-meter-max><a
+ href="#value4">value</a></code> and <code title=attr-meter-max><a
href="#max1">max</a></code> attributes are specified, then, if the
result of processing the <code><a
href="#textcontent">textContent</a></code> of the element was one number
@@ -14825,7 +14832,7 @@
</div>
<p>The <dfn id=min0 title=dom-meter-min><code>min</code></dfn>, <dfn
- id=max2 title=dom-meter-max><code>max</code></dfn>, <dfn id=value4
+ id=max2 title=dom-meter-max><code>max</code></dfn>, <dfn id=value5
title=dom-meter-value><code>value</code></dfn>, <dfn id=low0
title=dom-meter-low><code>low</code></dfn>, <dfn id=high0
title=dom-meter-high><code>high</code></dfn>, and <dfn id=optimum0
@@ -14836,7 +14843,7 @@
href="#textcontent">textContent</a></code> never affects the DOM values.
<p class=big-issue>Would be cool to have the <code title=dom-meter-value><a
- href="#value4">value</a></code> DOM attribute update the <code><a
+ href="#value5">value</a></code> DOM attribute update the <code><a
href="#textcontent">textContent</a></code> in-line...</p>
<!-- XXX
should we also look inside the title="" attribute?
@@ -18338,7 +18345,7 @@
<dd><code title=attr-param-name><a href="#name5">name</a></code>
- <dd><code title=attr-param-value><a href="#value5">value</a></code>
+ <dd><code title=attr-param-value><a href="#value6">value</a></code>
<dt>DOM interface:
@@ -18346,7 +18353,7 @@
<pre
class=idl>interface <dfn id=htmlparamelement>HTMLParamElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
attribute DOMString <a href="#name6" title=dom-param-name>name</a>;
- attribute DOMString <a href="#value6" title=dom-param-value>value</a>;
+ attribute DOMString <a href="#value7" title=dom-param-value>value</a>;
};</pre>
</dl>
@@ -18356,7 +18363,7 @@
<p>The <dfn id=name5 title=attr-param-name><code>name</code></dfn>
attribute gives the name of the parameter.
- <p>The <dfn id=value5 title=attr-param-value><code>value</code></dfn>
+ <p>The <dfn id=value6 title=attr-param-value><code>value</code></dfn>
attribute gives the value of the parameter.
<p>Both attributes must be present. They may have any value.
@@ -18368,7 +18375,7 @@
name/value pair.
<p>The DOM attributes <dfn id=name6
- title=dom-param-name><code>name</code></dfn> and <dfn id=value6
+ title=dom-param-name><code>name</code></dfn> and <dfn id=value7
title=dom-param-value><code>value</code></dfn> must both <a
href="#reflect">reflect</a> the respective content attributes of the same
name.
@@ -27105,7 +27112,7 @@
<dd><code title=attr-input-type><a href="#type12">type</a></code>
- <dd><code title=attr-input-value><a href="#value7">value</a></code>
+ <dd><code title=attr-input-value><a href="#value8">value</a></code>
<dt>DOM interface:
@@ -27138,7 +27145,7 @@
attribute DOMString <a href="#target4" title=dom-fs-target>target</a>;
attribute DOMString <a href="#type13" title=dom-input-type>type</a>;
attribute DOMString <a href="#defaultvalue" title=dom-input-defaultValue>defaultValue</a>;
- attribute DOMString <a href="#value8" title=dom-input-value>value</a>;
+ attribute DOMString <a href="#value9" title=dom-input-value>value</a>;
attribute DOMTimeStamp <a href="#valueasdate" title=dom-input-valueAsDate>valueAsDate</a>;
attribute float <a href="#valueasnumber" title=dom-input-valueAsNumber>valueAsNumber</a>;
readonly attribute <a href="#htmloptionelement">HTMLOptionElement</a> <a href="#selectedoption" title=dom-input-selectedOption>selectedOption</a>;
@@ -28599,8 +28606,8 @@
state must be invoked.
<p>Each <code><a href="#input0">input</a></code> element has a <a
- href="#value10" title=concept-fe-value>value</a>, which is exposed by the
- <code title=dom-input-value><a href="#value8">value</a></code> DOM
+ href="#value11" title=concept-fe-value>value</a>, which is exposed by the
+ <code title=dom-input-value><a href="#value9">value</a></code> DOM
attribute.
<p>Each <code><a href="#input0">input</a></code> element has a boolean <dfn
@@ -28630,13 +28637,13 @@
href="#dirty0">dirty</a></i>) when the element is created, and must be set
to true (<i title=concept-input-dirty><a href="#dirty0">dirty</a></i>)
whenever the user interacts with the control in a way that changes the <a
- href="#value10" title=concept-fe-value>value</a>.
+ href="#value11" title=concept-fe-value>value</a>.
- <p>The <dfn id=value7 title=attr-input-value><code>value</code></dfn>
- content attribute gives the default <a href="#value10"
+ <p>The <dfn id=value8 title=attr-input-value><code>value</code></dfn>
+ content attribute gives the default <a href="#value11"
title=concept-fe-value>value</a> of the <code><a
href="#input0">input</a></code> element. When the <code
- title=attr-input-value><a href="#value7">value</a></code> content
+ title=attr-input-value><a href="#value8">value</a></code> content
attribute is added, set, or removed, and when the element is first
created, after invoking the <a href="#control0">control initialization
algorithm</a>, the <dfn id=default2>default value change algorithm</dfn>
@@ -28691,7 +28698,7 @@
id=defaultvalue
title=dom-input-defaultValue><code>defaultValue</code></dfn> DOM attribute
must <a href="#reflect">reflect</a> the <code title=attr-input-value><a
- href="#value7">value</a></code> content attribute.
+ href="#value8">value</a></code> content attribute.
<p>The <code title=dom-cva-willValidate><a
href="#willvalidate">willValidate</a></code>, <code
@@ -28730,18 +28737,18 @@
<a href="#default2">default value change algorithm</a> is as
follows:</strong> If the <code><a href="#input0">input</a></code> element
is not <i title=concept-input-dirty><a href="#dirty0">dirty</a></i> then
- set the <a href="#value10" title=concept-fe-value>value</a> of the element
+ set the <a href="#value11" title=concept-fe-value>value</a> of the element
to the value of the <code title=attr-input-value><a
- href="#value7">value</a></code> content attribute and <a
+ href="#value8">value</a></code> content attribute and <a
href="#strip">strip line breaks from the value</a>.
<p>If an <code><a href="#input0">input</a></code> element whose <code
title=attr-input-type><a href="#type12">type</a></code> attribute is in
the <a href="#text2" title=attr-input-type-text>Text</a> state is <i
title=concept-input-mutable><a href="#mutable">mutable</a></i>, its <a
- href="#value10" title=concept-fe-value>value</a> should be editable by the
+ href="#value11" title=concept-fe-value>value</a> should be editable by the
user. User agents must not allow users to insert U+000A LINE FEED (LF) or
- U+000D CARRIAGE RETURN (CR) characters into the <a href="#value10"
+ U+000D CARRIAGE RETURN (CR) characters into the <a href="#value11"
title=concept-fe-value>value</a> of such <code><a
href="#input0">input</a></code> elements.
@@ -29006,7 +29013,7 @@
<p>When a user agent is to <dfn id=strip>strip line breaks from the
value</dfn>, the user agent must remove any U+000A LINE FEED (LF) and
- U+000D CARRIAGE RETURN (CR) characters from <a href="#value10"
+ U+000D CARRIAGE RETURN (CR) characters from <a href="#value11"
title=concept-fe-value>value</a>.
<h5 id=common4><span class=secno>4.9.4.2. </span>Common <code><a
@@ -29084,18 +29091,67 @@
<h5 id=common5><span class=secno>4.9.4.3. </span>Common <code><a
href="#input0">input</a></code> element APIs</h5>
- <p class=big-issue>... <dfn id=checked1
- title=dom-input-checked><code>checked</code></dfn>
+ <h6 id=value><span class=secno>4.9.4.3.1. </span>Value manipulation</h6>
- <p class=big-issue>... <dfn id=value8
+ <p class=big-issue>... <dfn id=value9
title=dom-input-value><code>value</code></dfn>
- <p class=big-issue>... <dfn id=valueasdate
- title=dom-input-valueAsDate><code>valueAsDate</code></dfn>
+ <hr>
- <p class=big-issue>... <dfn id=valueasnumber
- title=dom-input-valueAsNumber><code>valueAsNumber</code></dfn>
+ <p>The <dfn id=valueasdate
+ title=dom-input-valueAsDate><code>valueAsDate</code></dfn> DOM attribute
+ represents the <span title=concept-input-value>value</span> of the
+ element, interpreted as a date.
+ <p>On getting, if the <code title=dom-input-valueAsDate><a
+ href="#valueasdate">valueAsDate</a></code> attribute applies, as defined
+ for the <code><a href="#input0">input</a></code> element's <code
+ title=attr-input-type><a href="#type12">type</a></code> attribute's
+ current state, then run the <dfn id=valueasdate0><code
+ title=dom-input-valueAsDate>valueAsDate</code> getter algorithm</dfn>
+ defined for that state. Otherwise, return a Not-a-Number (NaN) value.
+
+ <p>On setting, if the <code title=dom-input-valueAsDate><a
+ href="#valueasdate">valueAsDate</a></code> attribute applies, as defined
+ for the <code><a href="#input0">input</a></code> element's <code
+ title=attr-input-type><a href="#type12">type</a></code> attribute's
+ current state, then run the <dfn id=valueasdate1><code
+ title=dom-input-valueAsDate>valueAsDate</code> setter algorithm</dfn>
+ defined for that state. Otherwise, do nothing.
+
+ <hr>
+
+ <p>The <dfn id=valueasnumber
+ title=dom-input-valueAsNumber><code>valueAsNumber</code></dfn> DOM
+ attribute represents the <span title=concept-input-value>value</span> of
+ the element, interpreted as a number.
+
+ <p>On getting, if the <code title=dom-input-valueAsNumber><a
+ href="#valueasnumber">valueAsNumber</a></code> attribute applies, as
+ defined for the <code><a href="#input0">input</a></code> element's <code
+ title=attr-input-type><a href="#type12">type</a></code> attribute's
+ current state, then run the <dfn id=valueasnumber0><code
+ title=dom-input-valueAsNumber>valueAsNumber</code> getter algorithm</dfn>
+ defined for that state. Otherwise, return the <span
+ title=concept-input-value>value</span> of the element, cast to the type of
+ the DOM attribute.
+
+ <p>On setting, if the <code title=dom-input-valueAsNumber><a
+ href="#valueasnumber">valueAsNumber</a></code> attribute applies, as
+ defined for the <code><a href="#input0">input</a></code> element's <code
+ title=attr-input-type><a href="#type12">type</a></code> attribute's
+ current state, then run the <dfn id=valueasnumber1><code
+ title=dom-input-valueAsNumber>valueAsNumber</code> setter algorithm</dfn>
+ defined for that state. Otherwise, the <span
+ title=concept-input-value>value</span> must be set to the shortest
+ possible representation of the given value that is a <a
+ href="#valid1">valid floating point number</a> in base ten.
+
+ <h6 id=others...><span class=secno>4.9.4.3.2. </span>Others...</h6>
+
+ <p class=big-issue>... <dfn id=checked1
+ title=dom-input-checked><code>checked</code></dfn>
+
<p class=big-issue>... <dfn id=list
title=dom-input-list><code>list</code></dfn>
@@ -29407,7 +29463,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 <a href="#value8" title=dom-input-value>value</a>;
+ attribute DOMString <a href="#value9" title=dom-input-value>value</a>;
readonly attribute DOMString <span title=dom-option-text>text</span>;
readonly attribute long <span title=dom-option-index>index</span>;
@@ -29419,7 +29475,7 @@
<p class=big-issue>... <dfn id=selected1
title=concept-option-selected>selected</dfn>
- <p class=big-issue>... <dfn id=value9
+ <p class=big-issue>... <dfn id=value10
title=concept-option-value>value</dfn>
<p class=big-issue> <dfn id=option0
@@ -29728,7 +29784,7 @@
<p class=big-issue>... <dfn id=disabled6
title=dom-fe-disabled>disabled</dfn> DOM attribute
- <p class=big-issue>... <dfn id=value10 title=concept-fe-value>value</dfn></p>
+ <p class=big-issue>... <dfn id=value11 title=concept-fe-value>value</dfn></p>
<!-- XXX autocomplete: define somewhere that the value may be set from a stored value -->
<h4 id=attributes2><span class=secno>4.9.14 </span><dfn
@@ -30075,7 +30131,7 @@
href="#select">select</a></code> element that is <a href="#selected1"
title=concept-option-selected>selected</a>, append an entry in the
<var title="">form data set</var> with the <var title="">name</var> as
- the name and the <a href="#value9"
+ the name and the <a href="#value10"
title=concept-option-value>value</a> of the <code><a
href="#option">option</a></code> element as the value.
@@ -30093,7 +30149,7 @@
<li>
<p>Otherwise, append an entry in the <var title="">form data set</var>
- with <var title="">name</var> as the name and the <a href="#value10"
+ with <var title="">name</var> as the name and the <a href="#value11"
title=concept-fe-value>value</a> of the <var title="">field</var>
element as the value.
</ol>
@@ -32805,7 +32861,7 @@
<p>The <code title=dom-provider-getCellData><a
href="#getcelldata">getCellData()</a></code> method must return the
- <code title=dom-input-value><a href="#value8">value</a></code> of the
+ <code title=dom-input-value><a href="#value9">value</a></code> of the
<code><a href="#input0">input</a></code> element.</p>
<p>The <code title=dom-provider-getCellClasses><a
@@ -32816,7 +32872,7 @@
<p>The <code title=dom-provider-editCell><a
href="#editcell">editCell()</a></code> method must set the <code><a
href="#input0">input</a></code> element's <code title=dom-input-value><a
- href="#value8">value</a></code> DOM attribute to the value of the third
+ href="#value9">value</a></code> DOM attribute to the value of the third
argument to the method.</p>
<p>The <code title=dom-provider-setCellCheckedState><a
@@ -34700,7 +34756,7 @@
<p>If the <a href="#type22" title=command-facet-Type>Type</a> is "command",
then it is the string given by the <code title=attr-input-value><a
- href="#value7">value</a></code> attribute, if any, and a
+ href="#value8">value</a></code> attribute, if any, and a
<span>UA-dependent value</span><!-- XXX xref--> that the UA uses to label
the button itself if the attribute is absent.
@@ -34712,7 +34768,7 @@
question is the <a href="#label4" title=command-facet-Label>Label</a> (in
DOM terms, this the string given by <code><var
title="">element</var>.labels[0].textContent</code>). Otherwise, the value
- of the <code title=attr-input-value><a href="#value7">value</a></code>
+ of the <code title=attr-input-value><a href="#value8">value</a></code>
attribute, if present, is the <a href="#label4"
title=command-facet-Label>Label</a>. Otherwise, the <a href="#label4"
title=command-facet-Label>Label</a> is the empty string.
@@ -45190,7 +45246,7 @@
default value. For <code><a href="#input0">input</a></code> elements
this means updating the <code title=dom-input-defaultValue><a
href="#defaultvalue">defaultValue</a></code> DOM attribute as well as
- the <code title=dom-input-value><a href="#value8">value</a></code> DOM
+ the <code title=dom-input-value><a href="#value9">value</a></code> DOM
attribute; for <code><a href="#select">select</a></code> elements it
means updating the <code><a href="#option">option</a></code> elements'
<code title=dom-option-defaultSelected>defaultSelected</code> DOM
@@ -49731,7 +49787,7 @@
<div class=example>
<p>In the following example, the <code title=attr-input-value><a
- href="#value7">value</a></code> attribute is given with the unquoted
+ href="#value8">value</a></code> attribute is given with the unquoted
attribute value syntax:</p>
<pre><input <em>value=yes</em>></pre>
Modified: source
===================================================================
--- source 2008-09-18 00:21:27 UTC (rev 2211)
+++ source 2008-09-18 00:42:00 UTC (rev 2212)
@@ -25581,10 +25581,68 @@
<h5>Common <code>input</code> element APIs</h5>
+ <h6>Value manipulation</h6>
+
+ <p class="big-issue">... <dfn title="dom-input-value"><code>value</code></dfn></p>
+
+ <hr>
+
+ <p>The <dfn
+ title="dom-input-valueAsDate"><code>valueAsDate</code></dfn> DOM
+ attribute represents the <span
+ title="concept-input-value">value</span> of the element, interpreted
+ as a date.</p>
+
+ <p>On getting, if the <code
+ title="dom-input-valueAsDate">valueAsDate</code> attribute applies,
+ as defined for the <code>input</code> element's <code
+ title="attr-input-type">type</code> attribute's current state, then
+ run the <dfn><code title="dom-input-valueAsDate">valueAsDate</code>
+ getter algorithm</dfn> defined for that state. Otherwise, return a
+ Not-a-Number (NaN) value.</p>
+
+ <p>On setting, if the <code
+ title="dom-input-valueAsDate">valueAsDate</code> attribute applies,
+ as defined for the <code>input</code> element's <code
+ title="attr-input-type">type</code> attribute's current state, then
+ run the <dfn><code title="dom-input-valueAsDate">valueAsDate</code>
+ setter algorithm</dfn> defined for that state. Otherwise, do
+ nothing.</p>
+
+ <hr>
+
+ <p>The <dfn
+ title="dom-input-valueAsNumber"><code>valueAsNumber</code></dfn> DOM
+ attribute represents the <span
+ title="concept-input-value">value</span> of the element, interpreted
+ as a number.</p>
+
+ <p>On getting, if the <code
+ title="dom-input-valueAsNumber">valueAsNumber</code> attribute
+ applies, as defined for the <code>input</code> element's <code
+ title="attr-input-type">type</code> attribute's current state, then
+ run the <dfn><code
+ title="dom-input-valueAsNumber">valueAsNumber</code> getter
+ algorithm</dfn> defined for that state. Otherwise, return the <span
+ title="concept-input-value">value</span> of the element, cast to the
+ type of the DOM attribute.</p>
+
+ <p>On setting, if the <code
+ title="dom-input-valueAsNumber">valueAsNumber</code> attribute
+ applies, as defined for the <code>input</code> element's <code
+ title="attr-input-type">type</code> attribute's current state, then
+ run the <dfn><code
+ title="dom-input-valueAsNumber">valueAsNumber</code> setter
+ algorithm</dfn> defined for that state. Otherwise, the <span
+ title="concept-input-value">value</span> must be set to the shortest
+ possible representation of the given value that is a <span>valid
+ floating point number</span> in base ten.</p>
+
+
+
+ <h6>Others...</h6>
+
<p class="big-issue">... <dfn title="dom-input-checked"><code>checked</code></dfn></p>
- <p class="big-issue">... <dfn title="dom-input-value"><code>value</code></dfn></p>
- <p class="big-issue">... <dfn title="dom-input-valueAsDate"><code>valueAsDate</code></dfn></p>
- <p class="big-issue">... <dfn title="dom-input-valueAsNumber"><code>valueAsNumber</code></dfn></p>
<p class="big-issue">... <dfn title="dom-input-list"><code>list</code></dfn></p>
<p class="big-issue">... <dfn title="dom-input-selectedOption"><code>selectedOption</code></dfn></p>
<p class="big-issue">... <dfn title="dom-input-stepUp"><code>stepUp()</code></dfn></p>
More information about the Commit-Watchers
mailing list