This commit is contained in:
kunfei
2023-04-19 15:09:57 +08:00
parent eea0f97a5b
commit f2c1860e07

View File

@@ -236,7 +236,9 @@ interface BaseSource : JsExtensions {
bindings["cookie"] = CookieStore
bindings["cache"] = CacheManager
val scope = SCRIPT_ENGINE.getRuntimeScope(SCRIPT_ENGINE.getScriptContext(bindings))
scope.prototype = getShareScope()
getShareScope()?.let {
scope.prototype = it
}
return SCRIPT_ENGINE.eval(jsStr, scope)
}