Support console.log/error with non-array arguments
This commit is contained in:
parent
87fadcf2aa
commit
5e64876ce7
1 changed files with 6 additions and 1 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue