Relationship between globals, Realms, and global environment records
Boris Zbarsky
bzbarsky at mit.edu
Tue Nov 25 20:07:56 PST 2014
On 11/25/14, 2:48 PM, Allen Wirfs-Brock wrote:
> It would be trivial to change the ES spec. to allow for the script this binding and global object to be set to independent value when a Realm is created.
I think we do want this, but that's not enough, unfortunately. Consider
this script, executed at toplevel:
Object.defineProperty(Object.prototype, "foo", { get: function() {
return this; } });
var z = foo;
Is z a Window or a WindowProxy? In browsers, as far as I can tell, it's
interoperably a WindowProxy. I put a testcase at
http://web.mit.edu/bzbarsky/www/testcases/windowproxy/getter-on-proto-chain-root.html
if people want to take a look. This wouldn't be covered by the "script
this binding" bit, though, or would it?
-Boris
More information about the es-discuss
mailing list