I\'m using Firebug and have some statements like:
console.log(\"...\");
in my page. In IE8 (probably earlier versions too) I get script err
In IE9, if console is not opened, this code:
alert(typeof console);
will show "object", but this code
alert(typeof console.log);
will throw TypeError exception, but not return undefined value;
So, guaranteed version of code will look similar to this:
try {
if (window.console && window.console.log) {
my_console_log = window.console.log;
}
} catch (e) {
my_console_log = function() {};
}