public static Object getLocalVar(ExecutionContext context, String name) {
        LexicalEnvironment localEnv = context.getLexicalEnvironment();
        if (localEnv.getRecord().hasBinding(context, name)) {
            return localEnv.getRecord().getBindingValue(context, name, false);
        }
        return null;
    }
public static Object getLocalVar ( ExecutionContext context , String name ) { LexicalEnvironment localEnv = context . getLexicalEnvironment ( ) ; if ( localEnv . getRecord ( ) . hasBinding ( context , name ) ) { return localEnv . getRecord ( ) . getBindingValue ( context , name , false ) ; } return null ; }
A convenience for module providers. Gets a scoped variable from
the provided ExecutionContext
@param context The context to search for name
@param name The name of the variable
@return The value of the variable