diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-02-28 10:28:22 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-02-28 10:28:22 -0500 |
commit | 4b57c3cc7b5abd704b682dc4eb72606088af8344 (patch) | |
tree | 83a811976bcdc11ba9453850c0ac83e8c443af08 /src/shell.html | |
parent | 0b147ccfb48288ea9d17d52205c3b74f7e9ae9de (diff) |
support multiple arguments to default html print, printErr
Diffstat (limited to 'src/shell.html')
-rw-r--r-- | src/shell.html | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shell.html b/src/shell.html index 3a0171de..4f39b26a 100644 --- a/src/shell.html +++ b/src/shell.html @@ -32,6 +32,7 @@ var element = document.getElementById('output'); element.value = ''; // clear browser cache return function(text) { + text = Array.prototype.slice.call(arguments).join(' '); // These replacements are necessary if you render to raw HTML //text = text.replace(/&/g, "&"); //text = text.replace(/</g, "<"); @@ -42,6 +43,7 @@ }; })(), printErr: function(text) { + text = Array.prototype.slice.call(arguments).join(' '); if (0) { // XXX disabled for safety typeof dump == 'function') { dump(text + '\n'); // fast, straight to the real console } else { |