Skip to content

Commit 7830cc1

Browse files
committed
handle SINGLE_FILE in getBinary (emscripten-core#5296)
1 parent 5fc15eb commit 7830cc1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/preamble.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2218,6 +2218,9 @@ function integrateWasmJS(Module) {
22182218
} else if (Module['readBinary']) {
22192219
binary = Module['readBinary'](wasmBinaryFile);
22202220
} else {
2221+
binary = tryParseAsDataURI(wasmBinaryFile);
2222+
}
2223+
if (!binary) {
22212224
throw "on the web, we need the wasm binary to be preloaded and set on Module['wasmBinary']. emcc.py will do that for you when generating HTML (but not JS)";
22222225
}
22232226
return binary;

0 commit comments

Comments
 (0)