Skip to content

Commit

Permalink
Replace new-formatted instantiate
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgonmic committed Oct 17, 2024
1 parent 8d7806f commit 4c708f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/js-executor/execute-es-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ function prepareJsCode(jsCode) {
"instantiateStreaming(fetch(wasmFilePath), importObject)).instance;",
"instantiate(window.wasmCode, importObject)).instance;\nwindow.wasmCode = undefined;"
)
.replace(
"instantiateStreaming(fetch(new URL('./moduleId.wasm',import.meta.url).href), importObject)).instance;",
"instantiate(window.wasmCode, importObject)).instance;\nwindow.wasmCode = undefined;"
)
.replace(
"const importObject = {",
"js_code['kotlin.io.printImpl'] = (message) => bufferedOutput.buffer += message\n" +
Expand Down

0 comments on commit 4c708f6

Please sign in to comment.