resetContext

fun ScriptEngine.resetContext(nullGlobalContext: Boolean = false)

Resets the context of this ScriptEngine by creating a new SimpleScriptContext with fresh bindings.

Parameters

nullGlobalContext

if true, sets the global scope bindings to null; otherwise creates new empty bindings for the global scope