[whatwg] More input element feedback

Garrett Smith dhtmlkitchen at gmail.com
Mon Aug 3 17:57:51 PDT 2009


On Mon, Aug 3, 2009 at 12:09 AM, Ian Hickson<ian at hixie.ch> wrote:
> On Thu, 23 Jul 2009, Kartikaya Gupta wrote:
>>
>> The description for what to do on setting valueAsNumber doesn't fully
>> cover error conditions. It's not clear to me, for instance, what's
>> supposed if you have an input type="date" or type="number" and try to
>> set valueAsNumber to NaN. The description there (for date) just says
>> "... passing it a Date object whose time value is the new value ..." but
>> doesn't say what to do if the Date object can't be created.
>

In what case could a Date object not be created?

> # Unless otherwise specified, if a DOM attribute that is a floating point
> # number type (float) is assigned an Infinity or Not-a-Number value, a
> # NOT_SUPPORTED_ERR exception must be raised.
>  -- http://www.whatwg.org/specs/web-apps/current-work/#dependencies
>

Why did you want valueAsNumber in the first place? Is

Why do you need valueAsDate?

Both of these seem unnecessary, out of place and overcomplicate INPUT.
It has come up recently[1] and although it does not need to be decided
now, I think the value and design of these features deserve further
investigation of before writing implementation code. Unit tests for
valueAs*, might likely reveal complexity and superfluity and little
added value of these will become more obvious.

[nip[

Regards,

Garrett

[1]http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-July/021607.html



More information about the whatwg mailing list