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