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
practices.
David
[1] https://mail.mozilla.org/pipermail/test262-discuss/2013-July/000229.html
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss