We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60034f5 commit e143c4aCopy full SHA for e143c4a
1 file changed
src/app/service/sandbox/runtime.ts
@@ -424,7 +424,8 @@ export class Runtime {
424
} as ScriptLoadInfo;
425
426
// 使用 BgExecScriptWarp 执行,它会自动构建 setTimeout/setInterval 等
427
- const exec = new BgExecScriptWarp(scriptLoadInfo, this.windowMessage);
+ const extensionEnv = await this.extensionEnvAsync;
428
+ const exec = new BgExecScriptWarp(scriptLoadInfo, this.windowMessage, extensionEnv);
429
// 通过 sandboxContext 注入 args(BgExecScriptWarp 通过 globalInjection 注入了 setTimeout 等,
430
// sandboxContext 已经包含了这些,再追加 args 即可)
431
if ((exec as any).sandboxContext) {
0 commit comments