Add Number.parseInt and Number.parseFloat

RESOLVED FIXED in mozilla25

Status

()

Core
JavaScript Engine
RESOLVED FIXED
4 years ago
2 years ago

People

(Reporter: benvie, Assigned: till)

Tracking

(Blocks: 1 bug, {dev-doc-complete})

Trunk
mozilla25
dev-doc-complete
Points:
---

Firefox Tracking Flags

(relnote-firefox -)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
In ES6, `Number.parseInt` and `Number.parseFloat` have been added, and are the same as the global functions of the same names (purpose is modularization of globals).

See ES6 spec (May 2013 revision) sections 15.7.3.9 and 15.7.3.10.
(Assignee)

Comment 1

4 years ago
Created attachment 771686 [details] [diff] [review]
Add Number.parseInt and Number.parseFloat

This is all very straight-forward.

As these are meant to behave identical to their global function counterparts, I just added them to number_static_methods.

In case they ever deviate from the global functions in any way, the duplicated tests should catch any errors that might otherwise sneak in.
Attachment #771686 - Flags: review?(jwalden+bmo)
(Assignee)

Updated

4 years ago
Assignee: general → till
Attachment #771686 - Flags: review?(jwalden+bmo) → review+
(Assignee)

Comment 2

4 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/d520aeaf2e2c
Status: NEW → ASSIGNED

Comment 3

4 years ago
https://hg.mozilla.org/mozilla-central/rev/d520aeaf2e2c
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Keywords: dev-doc-needed
relnote-firefox: --- → ?
Assuming this does not need QA. Please remove the [qa-] whiteboard tag and add the verifyme keyword if QA is needed.
Whiteboard: [qa-]

Updated

4 years ago
relnote-firefox: ? → -
Added to "Firefox 25 for developer" release notes:
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/25#JavaScript

Updated reference docs:
Added to: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number
New: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/parseFloat
New: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/parseInt

As always, feel free to review and/or edit these pages in the MDN wiki.
Keywords: dev-doc-needed → dev-doc-complete

Updated

2 years ago
See Also: → bug 1135560
You need to log in before you can comment on or make changes to this bug.