Globalization API working draft

Erik Arvidsson erik.arvidsson at gmail.com
Wed Nov 2 14:12:12 PDT 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111102/6fc6685a/attachment.html>


More information about the es-discuss mailing list