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 12:07:00 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1PqP6y-0004w0-PQ@jessica.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=11887

--- Comment #6 from Mounir Lamouri <mounir.lamouri@gmail.com> 2011-02-18 12:07:00 UTC ---
(In reply to comment #5)
> 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.

Actually, when valueAsNumber is available, value can't contain something else
than a number so my previous comment doesn't apply...

-- 
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 12:07:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 18 February 2011 12:07:02 GMT