Microsoft presents new JavaScript extensions
As part of its TC39 ECMAScript working group efforts, Microsoft presented new experimental JavaScript extensions to the ECMA TC39 meeting held last week at Apple's Cupertino campus. The extensions add globalisation interfaces, as well as Math, Number and String libraries, to the JavaScript language core.
Microsoft said that it wanted to make the language more attractive for increasingly complicated web applications and server-side interactions. As JavaScript and web applications have become richer, "deficits in the capabilities of JavaScript as a runtime" have come into focus. The proposal adds various new objects and library helpers to ECMAScript:
Math | String | Number |
cosh, sinh, tanh acosh, asinh, atanh log2, log10, log1p, expm1 sign trunc |
startsWith, endsWith contains repeat toArray reverse |
isFinite isNaN isInteger toInteger |
Globalization. NumberFormat |
Globalization. DateFormat |
Globalization. Collator |
format (number) | format (date) | compare (x,y) |
Under Windows 7, Microsoft says that the prototypes also support 363 locales, 18 numbering formats, various date formats and a range of different calendars. The first reference implementations of the new extensions are available to download from Microsoft's HTML5 Labs. The Intrinsics Extensions and Globalization demos (only available for Internet Explorer 9) provide sample applications where users can see the new interfaces in action. Microsoft reminds developers that these extensions are for evaluation purposes only and should not be incorporated into production level code.
(crve)