diff options
Diffstat (limited to 'src/shell.js')
-rw-r--r-- | src/shell.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/shell.js b/src/shell.js index 850dfd81..d67cc45a 100644 --- a/src/shell.js +++ b/src/shell.js @@ -44,11 +44,7 @@ if (ENVIRONMENT_IS_NODE) { } } else if (ENVIRONMENT_IS_WEB) { - // Warning: We do not override print here, so that you can define it before - // this code runs. However, if you do not define it and it is actually - // called, it will try to print to a printer, and/or give odd errors. - - printErr = function(x) { + print = printErr = function(x) { console.log(x); }; @@ -99,6 +95,9 @@ try { if (!Module.arguments) { Module.arguments = arguments_; } +if (Module.print) { + print = Module.print; +} {{BODY}} |