This commit is contained in:
kunfei committed 2023-04-18 11:22:18 +08:00
1 parent e52caecefd
commit b3571d93d6
1 file changed
+3 -1
@@ -235,7 +235,9 @@ interface BaseSource : JsExtensions {
bindings["baseUrl"] = getKey()
bindings["cookie"] = CookieStore
bindings["cache"] = CacheManager
return SCRIPT_ENGINE.eval(jsStr, bindings)
val scope = SCRIPT_ENGINE.getRuntimeScope(SCRIPT_ENGINE.getScriptContext(bindings))
scope.prototype = getShareScope()
return SCRIPT_ENGINE.eval(jsStr, scope)
}
fun getShareScope(): Scriptable? {