aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/library.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js
index 86897f11..598838a0 100644
--- a/src/library.js
+++ b/src/library.js
@@ -309,6 +309,11 @@ LibraryManager.library = {
FS.ensureRoot();
+ // Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here
+ input = input || Module['stdin'];
+ output = output || Module['stdout'];
+ error = error || Module['stderr'];
+
// Default handlers.
if (!input) input = function() {
if (!input.cache || !input.cache.length) {