is [[Prototype]] of global object intentionally unspecified?

David Bruant bruant.d at
Mon Aug 5 10:29:22 PDT 2013

Le 05/08/2013 17:08, Brendan Eich a écrit :
> Michael Ficarra wrote:
>> specified that the global object's prototype chain must include 
>> Object.prototype. I am sure there's plenty of code that depends on that.
Concern shared.

> Yes, that's required.
Would it make sense to leave ECMAScript spec intact (global's 
[[Prototype]] is implementation-dependent), but have WebIDL put 
requirements on the prototype chain?
That would allow non-web contexts to have null as [[Prototype]]; and 
some people seem to want to do that [1].

I imagine that code that requires the global object to inherit from 
Object.prototype is code doing "window.hasOwnProperty('whatever')" which 
is only needed for web compat and isn't really given modern JavaScript 



More information about the es-discuss mailing list