Friday, 27 April 2012

Cross-browser safe javascript console logging

You can keep this in your js code and it won't error on non-supporting browsers:
if(window.console.log&&window.console){window.console.log('This is safe!');}

No comments:

Post a Comment

Comments are moderated, so you'll have to wait a little bit before they appear!