added log method to gui.js

This commit is contained in:
jonobr1 2011-01-23 13:54:09 -08:00
parent b50f71fdf6
commit 51e844ec48

9
gui.js
View File

@ -11,7 +11,7 @@ var GUI = new function() {
var handler = addHandlers[type]; var handler = addHandlers[type];
if (handler) { if (handler) {
} else { } else {
console.error("I don't know how to handle data type: " + type); log("I don't know how to handle data type: " + type);
} }
} }
@ -37,3 +37,10 @@ var GUI = new function() {
}; };
}; };
// Now we don't need to worry about console.log
var log = function(item) {
if(window.console)
if(trim(window.console.firebug) != '')
console.info(item);
};