rajesh gollapudi's blog http://rajeshg.com Most recent posts at rajesh gollapudi's blog posterous.com Wed, 13 Jan 2010 14:29:00 -0800 how not to let console.log() to cause error on IE or other browsers - SitePoint Forums http://rajeshg.com/how-not-to-let-consolelog-to-cause-error-on-i http://rajeshg.com/how-not-to-let-consolelog-to-cause-error-on-i
if (typeof console == "undefined" || typeof console.log == "undefined") var console = { log: function() {} };

This is a fix for Firebug's console.log statements causing js execution problems in other browser. The above code has to be pasted at the top of javascript statements on your page or before the usage of the first console.log statement

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/681852/41674_706545079_2156_q.jpg http://posterous.com/people/36jwzEOMAcIF Rajesh Gollapudi rajesh Rajesh Gollapudi