public static void setLocalVar ( ExecutionContext context , String name , Object value ) { LexicalEnvironment localEnv = context . getLexicalEnvironment ( ) ; localEnv . getRecord ( ) . createMutableBinding ( context , name , false ) ; localEnv . getRecord ( ) . setMutableBinding ( context , name , value , false ) ; }
A convenience for module providers . Sets a scoped variable on the provided ExecutionContext .