diff --git a/src/preamble.js b/src/preamble.js index e3521d04076de..da1e44f0db987 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -2218,6 +2218,9 @@ function integrateWasmJS(Module) { } else if (Module['readBinary']) { binary = Module['readBinary'](wasmBinaryFile); } else { + binary = tryParseAsDataURI(wasmBinaryFile); + } + if (!binary) { 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)"; } return binary;