diff options
Diffstat (limited to 'src/shell.js')
-rw-r--r-- | src/shell.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/shell.js b/src/shell.js index bac4eaa3..f91aa96a 100644 --- a/src/shell.js +++ b/src/shell.js @@ -74,7 +74,12 @@ else if (ENVIRONMENT_IS_SHELL) { Module['print'] = print; if (typeof printErr != 'undefined') Module['printErr'] = printErr; // not present in v8 or older sm - Module['read'] = read; + if (typeof read != 'undefined') { + Module['read'] = read; + } else { + Module['read'] = function() { throw 'no read() available (jsc?)' }; + } + Module['readBinary'] = function(f) { return read(f, 'binary'); }; |