More accurate global object definition?
allen at wirfs-brock.com
Fri Apr 26 15:43:50 PDT 2013
The right place to discuss this is probably in  below.
On Apr 27, 2013, at 12:13 AM, David Bruant wrote:
> ES5 remains pretty vague as far as the global object is concerned . 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  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 .
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 . The tests are valid according to the ES5.1 spec.
>  http://www.ecma-international.org/ecma-262/5.1/#sec-15.1
>  https://bugzilla.mozilla.org/show_bug.cgi?id=828787
>  https://bugs.ecmascript.org/show_bug.cgi?id=1453
> es-discuss mailing list
> es-discuss at mozilla.org
More information about the es-discuss