(Emscripten) Use .bind() on the console object

This commit is contained in:
Rob Loach 2016-09-15 00:45:25 -04:00
parent 8564a5b266
commit 993de8b4c4
No known key found for this signature in database
GPG Key ID: 627C60834A74A21A

View File

@ -239,9 +239,9 @@ var Module =
arguments: ["-v", "--menu"],
preRun: [],
postRun: [],
// Print both stdout and stderr to the browser console.
print: console.log,
printErr: console.log,
// Log both stdout and stderr with the browser's console object.
print: console.log.bind(console),
printErr: console.log.bind(console),
canvas: document.getElementById('canvas'),
totalDependencies: 0,
monitorRunDependencies: function(left)