Created
March 26, 2018 00:03
-
-
Save FabioAntunes/e7577dbcff4f69bf7f3be485c34b8492 to your computer and use it in GitHub Desktop.
Realm proposal exam ple
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let realm = new Realm(); | |
let outerGlobal = window; | |
let innerGlobal = realm.global; | |
let f = realm.evalScript("(function() { return 17 })"); | |
f() === 17 // true | |
Reflect.getPrototypeOf(f) === outerGlobal.Function.prototype // false | |
Reflect.getPrototypeOf(f) === innerGlobal.Function.prototype // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment