Short URL: http://html5.org/r/2212
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 2212 | WF2: Define input.valueAsDate and input.valueAsNumber for the cases where they don't apply. | 2008-09-18 00:42 |
Index: source =================================================================== --- source (revision 2211) +++ source (revision 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>