More accurate global object definition?

Allen Wirfs-Brock allen at wirfs-brock.com
Fri Apr 26 15:43:50 PDT 2013


The right place to discuss this is probably in [3] below. 


On Apr 27, 2013, at 12:13 AM, David Bruant wrote:

> Hi,
> 
> ES5 remains pretty vague as far as the global object is concerned [1]. Specifically, the [[Class]] is left to the implementation suggesting

No, [[Class]] does not suggest anything about the internal methods that isn't explicitly specifried

> that internal [[Get]], [[Set]], etc. are unbounded on what they can do. For instance, when doing "this.Object", an implementation could do anything and return anything and still be conformant which defeats the intuition of the fact that "Object" is a property of the global object.

No, if the global object could have any possible definition of the essential internal methods then global declarations would not work and everything goes down hill from there.

> I believe it'd be a good thing to pin down what's allowed and what is not for the global object. Specifically, a recent change in Firefox [2] made a lot of tests playing with the global object fail. However, due to lack of specification on the global object, these tests should currently be considered invalid [3].

No these are valid tests. 
> 
> Should these tests be invalid or the definition of the global object be made more accurate?

See comment thread on [3]. The tests are valid according to the ES5.1 spec. 

> 
> David
> 
> [1] http://www.ecma-international.org/ecma-262/5.1/#sec-15.1
> [2] https://bugzilla.mozilla.org/show_bug.cgi?id=828787
> [3] https://bugs.ecmascript.org/show_bug.cgi?id=1453
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
> 



More information about the es-discuss mailing list