log multiple arguments support + Remove unused msgs argument
This commit is contained in:
parent
5e64876ce7
commit
08bce08db5
2 changed files with 5 additions and 5 deletions
|
|
@ -1,12 +1,12 @@
|
||||||
"no use strict";
|
"no use strict";
|
||||||
|
|
||||||
var console = {
|
var console = {
|
||||||
log: function(msgs) {
|
log: function() {
|
||||||
msgs = Array.prototype.slice.call(arguments, 0);
|
var msgs = Array.prototype.slice.call(arguments, 0);
|
||||||
postMessage({type: "log", data: msgs});
|
postMessage({type: "log", data: msgs});
|
||||||
},
|
},
|
||||||
error: function(msgs) {
|
error: function() {
|
||||||
msgs = Array.prototype.slice.call(arguments, 0);
|
var msgs = Array.prototype.slice.call(arguments, 0);
|
||||||
postMessage({type: "log", data: msgs});
|
postMessage({type: "log", data: msgs});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ var WorkerClient = function(topLevelNamespaces, mod, classname) {
|
||||||
var msg = e.data;
|
var msg = e.data;
|
||||||
switch(msg.type) {
|
switch(msg.type) {
|
||||||
case "log":
|
case "log":
|
||||||
window.console && console.log && console.log(msg.data);
|
window.console && console.log && console.log.apply(console, msg.data);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "event":
|
case "event":
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue