summaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js')
-rw-r--r--src/js/wasm.js-post.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/js/wasm.js-post.js b/src/js/wasm.js-post.js
index 5d3988432..9851fc777 100644
--- a/src/js/wasm.js-post.js
+++ b/src/js/wasm.js-post.js
@@ -154,7 +154,10 @@ function integrateWasmJS(Module) {
// do-method functions
function doJustAsm() {
- eval(Module['read'](asmjsCodeFile));
+ if (typeof Module['asm'] !== 'function') {
+ // you can load the .asm.js file before this, to avoid this sync xhr and eval
+ eval(Module['read'](asmjsCodeFile));
+ }
if (typeof Module['asm'] !== 'function') {
// evalling the asm.js file should have set this
Module['printErr']('asm evalling did not set the module properly');