Created
December 10, 2010 20:18
-
-
Save nathanl/736738 to your computer and use it in GitHub Desktop.
A simple wrapper for console.log that doesn't break anything if the user has no console to call
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function safelog(message) { | |
try{ console.log(message); } catch(e){ /*do nothing*/ } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment