1 of 10

Intl Enumeration API�[Stage 2]

April 2021 Update

2 of 10

Charter of “Intl Enumeration API”

List supported values of options in pre-existing ECMA 402 API.

3 of 10

Motivation / Background / History

  • Motivated Temporal proposal https://github.com/tc39/ecma402/issues/435
  • Advanced to Stage 1 in June 2020 TC39 meeting.
  • Advanced to Stage 2 in September 2020 TC39 meeting.
    • Didn’t get Stage 3 Reviewers Sign Up -�Due to misunderstanding of the term of “Stage 3 Reviewer” from the champion.
  • Update in November 2020 TC39 meeting
  • 2021-03 ECMA402 Meeting- Reaffirmed fit “Prior Art / Difficult to Implement in Userland / Broad Appeal” Stage 2 Requirements
  • 2021-04 ECMA402 Meeting- Mozilla, Apple and others all agree no more privacy/fingerprinting concerns regarding this proposal. (closed #3)

4 of 10

Privacy / Fingerprinting Concerns

“Mozilla does not believe that Intl.Enumeration proposal opens up any new fingerprinting vector and thus we do not believe it should be blocked on that ground.”

“Intl.Enumeration Privacy Implications Mozilla’s Recommendation”. �Tom Ritter, Anne van Kesteren, Steven Englehardt, Zibi Braniecki, Feb 4, 2021.�https://docs.google.com/document/d/1Zw6cYNJpL69HtQfA4-S7bKlCPywhhmoF6Mja-qy-JpU

Delegate from Apple agreed with the privacy analysis from Mozilla during 2021-04-08 ECMA 402 meeting.

A

Resolved!

5 of 10

Scope

Includes other values of option in ECMA402 API:

  • Calendar
  • Collation
  • Currency
  • NumberingSystems [listed in Table 4]
  • TimeZone
  • Unit [listed in Table 2]

6 of 10

  • Intl.supportedValuesOf ( key [ , options ])
  • Valid values for key:
    • “calendar”,
    • “collation”,
    • “currency”,
    • “numberingSystem”,
    • “timeZone”,
    • “unit”.
  • Return a %SupportedValues.prototype% Object which has a [ @@iterator ] () method.

API - one method in Intl object

7 of 10

// Find out the supported calendars

for (const calendar of Intl.supportedValuesOf("calendar")) {

// 'buddhist', 'chinese', ... 'islamicc'

}

// Find out the supported currencies

for (const currency of Intl.supportedValuesOf("currency")) {

// 'AED', 'AFN', 'ALL', ... 'ZWL'

}

// Find out the supported numbering systems

for (const numberingSystem ofIntl.supportedValuesOf("numberingSystem")) {

// 'adlm', 'ahom', 'arab', ... 'wara', 'wcho'

}

// Find out the supported time zones

for (const timeZone of Intl.supportedValuesOf("timeZone")) {

// 'Africa/Abidjan', 'Africa/Accra', ... 'Pacific/Wallis'

}

// Find out the supported units

for (const unit of Intl.supportedValuesOf("unit") {

// 'acre', 'bit', 'byte', ... 'year'

}

8 of 10

Options

// Find out the supported time zones of region "US"

for (const timeZoneInUS ofIntl.supportedValuesOf("timeZone", {region: "US")) {

// "America/Adak", "America/Anchorage", ... � // "America/Yakutat", "Pacific/Honolulu"

}

9 of 10

Spec Text

10 of 10

Request to TC39

Need one or two additional Stage 3 Reviewers