You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.
The latest ES6 draft contains specification text for Realm objects: globals that get a new set of bindings for all builtins, etc.
These are used to implement module loading, which can be done in a way that the loaded module is entirely separate from existing state. Code evaluated in such a realm uses the realm's global as its lexical this.
By passing options to the Realm ctor, it's possible to customize this and provide your own implementations of (direct and indirect) eval. Plus, you then have access to realm.global, and can add or delete whatever builtins you want.
See a discussion of realms in the nov 21 meeting notes. (Not directly linkable, search for "Realms: Globals, Intrinsics, Eval Hooks")
The text was updated successfully, but these errors were encountered:
Realms haven't made it into ES6 as a content-visible API, after all. We might use sandboxes in the extension and iframes in other embeddings, but this particular issue isn't going anywhere.
The latest ES6 draft contains specification text for Realm objects: globals that get a new set of bindings for all builtins, etc.
These are used to implement module loading, which can be done in a way that the loaded module is entirely separate from existing state. Code evaluated in such a realm uses the realm's global as its lexical
this
.By passing options to the Realm ctor, it's possible to customize this and provide your own implementations of (direct and indirect) eval. Plus, you then have access to
realm.global
, and can add or delete whatever builtins you want.See a discussion of realms in the nov 21 meeting notes. (Not directly linkable, search for "Realms: Globals, Intrinsics, Eval Hooks")
The text was updated successfully, but these errors were encountered: