Override print and printErr

This commit is contained in:
bas-d
2019-05-11 17:15:14 +02:00
parent 8c93825aa5
commit e1176fe2bb
+6
View File
@@ -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 */