log multiple arguments support + Remove unused msgs argument

This commit is contained in:
Mostafa Eweda 2012-10-15 18:12:32 +02:00
commit 08bce08db5
2 changed files with 5 additions and 5 deletions

View file

@ -1,12 +1,12 @@
"no use strict";
var console = {
log: function(msgs) {
msgs = Array.prototype.slice.call(arguments, 0);
log: function() {
var msgs = Array.prototype.slice.call(arguments, 0);
postMessage({type: "log", data: msgs});
},
error: function(msgs) {
msgs = Array.prototype.slice.call(arguments, 0);
error: function() {
var msgs = Array.prototype.slice.call(arguments, 0);
postMessage({type: "log", data: msgs});
}
};

View file

@ -84,7 +84,7 @@ var WorkerClient = function(topLevelNamespaces, mod, classname) {
var msg = e.data;
switch(msg.type) {
case "log":
window.console && console.log && console.log(msg.data);
window.console && console.log && console.log.apply(console, msg.data);
break;
case "event":