diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-06-01 11:52:22 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-06-01 11:52:22 -0700 |
commit | 86996a629ff53c6b4e325715b936bf9cacef4749 (patch) | |
tree | 49f46a6d5c051e15e3db2e7608ff3ef47b49fc4c /src/shell.html | |
parent | 3fec8cf78887d77580074e873a71d91917582f1d (diff) |
use dump when available instead of console.log
Diffstat (limited to 'src/shell.html')
-rw-r--r-- | src/shell.html | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/shell.html b/src/shell.html index 404c9c11..17283c8f 100644 --- a/src/shell.html +++ b/src/shell.html @@ -36,6 +36,13 @@ element.scrollTop = 99999; // focus on bottom }; })(), + printErr: function(text) { + if (typeof dump == 'function') { + dump(text + '\n'); // fast, straight to the real console + } else { + console.log(text); + } + }, canvas: document.getElementById('canvas'), setStatus: function(text) { if (Module.setStatus.interval) clearInterval(Module.setStatus.interval); |