Relationship between globals, Realms, and global environment records

Boris Zbarsky bzbarsky at
Tue Nov 25 08:25:01 PST 2014

On 11/25/14, 11:11 AM, Allen Wirfs-Brock wrote:
> regarding
>     var document =;
> perhaps you can model this by saying that every Document object is created in a new Realm.

Can you explain what problem you're trying to solve here, precisely? 
I'm not sure there's even a problem here, fwiw.  But creating every 
Document object in a new Realm is not obviously web-compatible (or more 
precisely would require some pretty major gyrations around the 
transition from the initial about:blank to a same-origin document to 
make it web-compatible: the entire state of the Realm at the point of 
transition would need to be copied over to the new Realm.  It's simpler 
to just use the same Realm).


More information about the es-discuss mailing list