I use firebug and make many calls to console.log, .info, .dir, etc. When the application starts on a machine with firebug disabled, this can cause errors. What is the best technique to avoid this? This seems to work:
// global scope if (typeof(console) == 'undefined') { console = { info : function() {}, dir : function() {}, error : function() {}, log : function() {} }; }
but I don't like the idea of ββmanually maintaining a list of console functions. Other ideas?
(We also have jQuery in the project, if that helps.)
source share