Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
6.5
-
None
Description
ECMA 262, which defines ECMAScript, a.k.a. JavaScript, provides for various functions to take some parameters which they should either ignore or interpret as specified by ECMA 402. ECMA 262 explicitly prohibits extending such methods except as specified by ECMA 402.
Slowly but surely, V4 comes under pressure to implement localization and people are cobbling in one extension or another in these places, without regard to ECMA 402. Where this has already happened (e.g. QTBUG-56923), we should at least add support for what ECMA 402 says should work; we are stuck with the pain of not being able to undo our past errors, but we can at least be compatible with standards-based code when folk write it, rather than forcing them to rewrite their code to be incompatible with every other JS engine out there. Where this has not yet happened, it would be better to get ahead of the game and implement what ECMA 402 says, before someone hacks in something incompatible; and where such hacks are in progress (e.g. for toLocaleUpper() and toLocaleLower()) we should at least aim to steer them towards being compatible with ECMA 402, even if they don't implement the whole of what it asks for.
Attachments
Issue Links
- relates to
-
QTBUG-56923 V4's Date claims to extend toLocale*String() in ways expressly forbidden by ECMA-262
- Open
-
QTBUG-112765 Create QLocaleSelector
- Open