Skip to content

Commit 047f6bf

Browse files
committed
fix(browser-vm): To execute code before trigger the loaded event
1 parent 737cdaa commit 047f6bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/browser-vm/src/dynamicNode/processor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ export class DynamicNodeProcessor {
127127
.then(({ resourceManager: { url, scriptCode } }) => {
128128
// It is necessary to ensure that the code execution error cannot trigger the `el.onerror` event
129129
setTimeout(() => {
130-
this.dispatchEvent('load');
131130
this.sandbox.execScript(scriptCode, {}, url, { noEntry: true });
131+
this.dispatchEvent('load');
132132
});
133133
})
134134
.catch((e) => {

0 commit comments

Comments
 (0)