This commit is contained in:
kunfei committed 2023-07-29 00:25:04 +08:00
1 parent 9fdeb2d9c6
commit c36eb2ca03
7 files changed
+88 -65

No files matched your search

@@ -48,6 +48,12 @@ object RhinoScriptEngine : AbstractScriptEngine(), Invocable, Compilable {
private val indexedProps: MutableMap<Any, Any?>
private val implementor: InterfaceImplementor
fun eval(js: String, bindingsConfig: SimpleBindings.() -> Unit = {}): Any? {
val bindings = SimpleBindings()
bindings.apply(bindingsConfig)
return eval(js, bindings)
}
@Throws(ScriptException::class)
override fun eval(reader: Reader, scope: Scriptable): Any? {
val cx = Context.enter()