Skip to content

Commit 2053539

Browse files
ilgonmiczoobestik
authored andcommitted
Replace new-formatted instantiate
1 parent 74fc465 commit 2053539

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/js-executor/execute-es-module.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ function prepareJsCode(jsCode) {
3535
"instantiateStreaming(fetch(wasmFilePath), importObject)).instance;",
3636
"instantiate(window.wasmCode, importObject)).instance;\nwindow.wasmCode = undefined;"
3737
)
38+
.replace(
39+
"instantiateStreaming(fetch(new URL('./moduleId.wasm',import.meta.url).href), importObject)).instance;",
40+
"instantiate(window.wasmCode, importObject)).instance;\nwindow.wasmCode = undefined;"
41+
)
3842
.replace(
3943
"const importObject = {",
4044
"js_code['kotlin.io.printImpl'] = (message) => bufferedOutput.buffer += message\n" +

0 commit comments

Comments
 (0)