This commit is contained in:
kunfei
2023-04-19 15:09:57 +08:00
parent 6df01b1bf4
commit abeee8acf9
@@ -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)
}