HTMLInputElement.valueAsNumber compliance (NaN handling.)
Change the valueAsNumber setter to follow the spec more closely:
http://www.whatwg.org/specs/web-apps/current-work/#dom-input-valueasnumber
- throw TypeError instead of NotSupportedError if the new value is
infinite.
- if the input element type supports 'valueAsNumber', then no longer
throw for NaN values, but consider this as setting the empty
string.
- better InvalidStateError error message when attempting to update
'valueAsNumber'.
This aligns with the spec as well as Gecko. And Trident (IE11) with
respect to NaN handling.
R=mkwst@chromium.org
BUG=
Review URL: https://codereview.chromium.org/149413004
git-svn-id: svn://svn.chromium.org/blink/trunk@166112 bbb929c8-8fbe-4397-9dbb-9b2b20218538
24 files changed