Supporting no console, and partial console’s
January 22nd, 2009
Developing a new Javascript widget today, I am bouncing between Firefox – with Firebug and IE 6 with IE WebDeveloper V2. I got things working nicely and have a condition in my code to check for the console object. Handling no console has been blogged about before, here.
if( !window['console'] ) {
window.console = { log: function(){}, warn: function(){}, error: function(){}, info: function(){}, debug: function(){} };
}

Recent Comments