Globalization API working draft

Nebojša Ćirić cira at google.com
Wed Nov 2 15:00:30 PDT 2011


We were told (I think by Allen) that setting [[Extensible]] to true would
conflict in some way with ES6 modules. I do agree it's a big restriction to
set it to false given how JavaScript works today.

So the question is - are we going to have problems with ES6 Modules is we
set this property to true? If so, is there another way of solving this
problem?

02. новембар 2011. 14.12, Erik Arvidsson <erik.arvidsson at gmail.com> је
написао/ла:

> The draft has the following:
>
> *6 The Globalization Object*
>
> The Globalization object is a single object that has some named
> properties, all of which are constructors.
>
> The value of the [[Prototype]] internal property of the Globalization
> object is the built-in Object prototype object specified by the ECMAScript
> Language Specification. The value of the [[Extensible]] internal property
> is false.
>
> This seems very bad and counter intuitive to how the web works. It would
> mean that there is no way to fix the Globalization object for browsers
> that are not fully up to date. Lets assume that in a future version of the
> spec the Globalization object gains a new property. The standard way to
> handle this in JS is to do:
>
> if (!Globalization.newProperty) {
>   Globalization.newProperty = ...;
> }
>
> This allows people to migrate to new features and it is how people
> gradually started to use Array extras.
>
> --
> erik
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>


-- 
Nebojša Ćirić
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111102/191ac713/attachment-0001.html>


More information about the es-discuss mailing list