mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user