Relationship between globals, Realms, and global environment records

Boris Zbarsky bzbarsky at
Tue Nov 25 10:47:48 PST 2014

On 11/25/14, 1:06 PM, Allen Wirfs-Brock wrote:
> Assuming that the global object is a WindowProxy then

The global object is a Window.  A WindowProxy is not the global object.

> HTML can retarget the proxy however it wants.


> So by changing the target of the proxy you can change the observed global bindings of IdentifierReferences.

That's actually not a goal, and is not what's either specced or what 
Firefox implements.

The global is a Window.  That's where global bindings live.  The 
WindowProxy is a proxy that has a Window as target, and which Window it 
has as target can change.  Various things like "window" and "self" and 
"top" and so forth return WindowProxy objects.  In fact, it's not 
possible for script to get an explicit reference to a Window object, as 
currently specified.


More information about the es-discuss mailing list