Closed
Bug 1403319
Opened 7 years ago
Closed 7 years ago
Expose Intl.NumberFormat.prototype.formatToParts
Categories
(Core :: JavaScript: Internationalization API, enhancement)
Core
JavaScript: Internationalization API
Tracking
()
RESOLVED
FIXED
mozilla58
Tracking | Status | |
---|---|---|
firefox58 | --- | fixed |
People
(Reporter: zbraniecki, Assigned: zbraniecki)
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
Intl.NumberFormat.prototype.formatToParts reached Stage 4 at today's TC39 meeting. We can expose it now to the public! :)
Updated•7 years ago
|
Keywords: dev-doc-needed
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → gandalf
Status: NEW → ASSIGNED
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8912816 -
Flags: review?(andrebargull)
Assignee | ||
Comment 2•7 years ago
|
||
Andre, can you take a look? The proposal reached Stage 4 so I'd like to expose it soon.
Also, it would help a lot with our tooling if you could pick a `[:abargull]` or similar nick for bugzilla and MR when requesting reviews from you ;)
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8912816 [details]
Bug 1403319 - Expose Intl.NumberFormat.prototype.formatToParts.
https://reviewboard.mozilla.org/r/184124/#review189698
We should now be able to run all NumberFormat.formatToParts tests from test262, so these exclusions should be removed <http://searchfox.org/mozilla-central/rev/f54c1723befe6bcc7229f005217d5c681128fcad/js/src/tests/jstests.list#363-368>, too.
::: js/src/builtin/Intl.cpp
(Diff revision 1)
> - // enabled, also add it.
> - if (cx->compartment()->creationOptions().experimentalNumberFormatFormatToPartsEnabled()) {
> - RootedValue ftp(cx);
> - HandlePropertyName name = cx->names().formatToParts;
> - if (!GlobalObject::getSelfHostedFunction(cx, cx->global(),
> - cx->names().NumberFormatFormatToParts,
Looks like `NumberFormatFormatToParts` and `formatToParts` can both now also be removed from vm/CommonPropertyNames.h.
::: js/src/tests/Intl/NumberFormat/formatToParts.js:1
(Diff revision 1)
> -// |reftest| skip-if(!this.hasOwnProperty("Intl")||typeof(newGlobal)!=="function"||!newGlobal({experimentalNumberFormatFormatToPartsEnabled:true}).Intl.NumberFormat().formatToParts)
> +// |reftest| skip-if(!this.hasOwnProperty("Intl")||typeof(newGlobal)!=="function")
`typeof(newGlobal)!=="function"` can also be removed now.
Attachment #8912816 -
Flags: review?(andrebargull) → review+
Comment 4•7 years ago
|
||
(In reply to André Bargull [:anba] from comment #3)
> We should now be able to run all NumberFormat.formatToParts tests from
> test262, so these exclusions should be removed
> <http://searchfox.org/mozilla-central/rev/
> f54c1723befe6bcc7229f005217d5c681128fcad/js/src/tests/jstests.list#363-368>,
> too.
Well, except for this one test which still expects Intl.NumberFormat.prototype.formatToParts.length is 0 instead of 1 <http://searchfox.org/mozilla-central/rev/f54c1723befe6bcc7229f005217d5c681128fcad/js/src/tests/test262/intl402/NumberFormat/prototype/formatToParts/length.js#9>. :-)
Assignee | ||
Comment 5•7 years ago
|
||
Thanks Andre! Submitted a PR to test262 for the length issue https://github.com/tc39/test262/pull/1249
I'll keep it skipped for now and once we merge updated test262 we can reenable it.
Comment hidden (mozreview-request) |
Pushed by zbraniecki@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/353baf72f789
Expose Intl.NumberFormat.prototype.formatToParts. r=anba
Comment 8•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Comment 9•7 years ago
|
||
Developer release notes
https://developer.mozilla.org/en-US/Firefox/Releases/58#JavaScript
Reference page
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat/formatToParts
Compat data
https://github.com/mdn/browser-compat-data/pull/612 (still WIP at this point)
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•