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 was archived by the owner on Apr 22, 2023. It is now read-only.
The VM context created via vm.createContext does only contain own keys of the object passed to it.
vara={x: 1};varb=Object.create(a);varctx_a=vm.createContext(a);varctx_b=vm.createContext(b);vm.runInContext('x',ctx_a);// 1vm.runInContext('x',ctx_b);// ReferenceError: x is not defined
Is this the correct behavior? Is this to prevent functions such as hasOwnProperty to exist in the context?