tc39/ecma402

How to use ecma402 Intl.GetCanonicalLocales in Android

Closed this issue · 1 comments

I compiled code using npm run build in windows, I then copied ecmarkup.js and ecmarkup.css that are generated into Android App

I m trying these library and get device locale by following code in Android (Pixel 6) device

Intl.getCanonicalLocales('EN-US');

It shows following errors, Refer attached screenshot.
Cannot read properties of null (reading 'addEventListener')
Cannot read properties of undefined (reading '$specContainer')

Screenshot 2024-02-06 at 4 47 31 PM

I do not have nodeJS in android application. is it required to have nodejs ? or I have to follow different build process for Android devices. current Android Version 14

sffc commented

Hi! You shouldn't need ecmarkup.js if your goal is to use this Intl API on Android. It looks like your error is coming from ecmarkup.js, so I would encourage you to file the bug on that repository (https://github.com/tc39/ecmarkup).