Emscripten: just use Module.onRuntimeInitialized = resolve;

This commit is contained in:
Frank Denis 2017-09-29 08:49:42 +02:00
parent 170661671d
commit 24ff2a7049

View File

@ -79,7 +79,7 @@ if [ "$DIST" = yes ]; then
} }
Module.ready = new Promise(function (resolve, reject) { Module.ready = new Promise(function (resolve, reject) {
Module.onAbort = reject; Module.onAbort = reject;
Module.onRuntimeInitialized = function () { resolve(); }; Module.onRuntimeInitialized = resolve;
$(cat "${PREFIX}/lib/libsodium.wasm.tmp.js") $(cat "${PREFIX}/lib/libsodium.wasm.tmp.js")
}).catch(function () { }).catch(function () {
Module.onAbort = undefined; Module.onAbort = undefined;