Support console.log/error with non-array arguments

This commit is contained in:
Lennart Kats 2012-10-15 15:24:37 +02:00
commit 5e64876ce7

View file

@ -2,7 +2,12 @@
var console = {
log: function(msgs) {
postMessage({type: "log", data: arguments.join(" ")});
msgs = Array.prototype.slice.call(arguments, 0);
postMessage({type: "log", data: msgs});
},
error: function(msgs) {
msgs = Array.prototype.slice.call(arguments, 0);
postMessage({type: "log", data: msgs});
}
};
var window = {