From e1176fe2bb75544752843919232c3a910f14061c Mon Sep 17 00:00:00 2001 From: bas-d <7903735+bas-d@users.noreply.github.com> Date: Sat, 11 May 2019 17:15:14 +0200 Subject: [PATCH] Override print and printErr --- dist-build/emscripten.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dist-build/emscripten.sh b/dist-build/emscripten.sh index d8975e5d..fb810781 100755 --- a/dist-build/emscripten.sh +++ b/dist-build/emscripten.sh @@ -99,6 +99,12 @@ if [ "$DIST" = yes ]; then Module.ready = new Promise(function(resolve, reject) { var Module = _Module; Module.onAbort = reject; + Module.print = function(what) { + console.log(what); + } + Module.printErr = function(what) { + console.warn(what); + } Module.onRuntimeInitialized = function() { try { /* Test arbitrary wasm function */