Relationship between globals, Realms, and global environment records

Boris Zbarsky bzbarsky at mit.edu
Tue Nov 25 11:27:46 PST 2014


On 11/25/14, 2:23 PM, Domenic Denicola wrote:
> The only remaining issue is that ES specifies that `this` is the global object in script code, whereas in browsers `this === window`, i.e. it is not actually the global object but instead the WindowProxy.

Yep.  This is the one remaining problem with this whole setup.

Note that this is kinda needed for web compat no matter what we do with 
the document.open() case, by the way, because if people grab "this" and 
hand it out to some script outside the window in question and then 
navigate the window, the "some script" needs to end up having a proxy 
for the new global.

-Boris



More information about the es-discuss mailing list