W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > February 2011

[Bug 11887] Remove useless input.valueAsNumber. Pretty much the same functionality can be achieved using parseFloat or parseInt

From: <bugzilla@jessica.w3.org>
Date: Fri, 18 Feb 2011 11:56:36 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1PqOwu-0004Q3-N4@jessica.w3.org>

--- Comment #5 from Mounir Lamouri <mounir.lamouri@gmail.com> 2011-02-18 11:56:36 UTC ---
I've actually found one situation where .valueAsNumber and parseFloat() would
differ: if .value begins with a valid number which is followed by a string.
For example: "42 foo"; parseFloat() will return 42 and .valueAsNumber NaN.

That might be a good reason to keep .valueAsNumber I think.

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Friday, 18 February 2011 11:56:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:01:41 UTC