Relationship between globals, Realms, and global environment records
d at domenic.me
Mon Nov 24 17:08:12 PST 2014
From: es-discuss [mailto:es-discuss-bounces at mozilla.org] On Behalf Of Allen Wirfs-Brock
> There is definite a 1:1:1 relationship between a global object, realmRec, global environment record. And ES views those relationships are immutable. You can't just change the global object of a realmRec or give it a different global environment record after it has been initialized.
Which brings up the questions:
1. Would it be possible to define realms (and possibly the other things) purely by attaching internal slots to the global objects?
2. How elegant/awkward would that be? Both conceptually and in concrete terms of structuring the spec.
Ian has previously expressed concerns that things on the web platform that start out 1:1 often become no-longer 1:1, like windows and documents (which are strangely enough many-to-many). Enforcing this 1:1 relationship would be a good idea, whether we do it by consolidating concepts or otherwise.
More information about the es-discuss