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
constvm=require('node:vm');constx=1;constcontext={x: 2};vm.createContext(context);// Contextify the object.constcode='x += 40; var y = 17;';// `x` and `y` are global variables in the context.// Initially, x has the value 2 because that is the value of context.x.vm.runInContext(code,context);console.log(context.x);// 42console.log(context.y);// 17console.log(x);// 1; y is not defined.
The Context Engine must be completed in order for scripting to work.
The way the Context Engine is supposed to work is that it will
main.js
scriptThe app also needs a
Context
class that will help the userThe text was updated successfully, but these errors were encountered: