Created
September 29, 2013 01:46
-
-
Save bkardell/6748578 to your computer and use it in GitHub Desktop.
Your browser's console api now minimally conforms :-p
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(){ | |
| var noOp = function(){}; | |
| var methods = [ | |
| 'assert','clear','count','debug','dir','dirxml','error','exception', | |
| 'group', 'groupCollapsed', 'groupEnd', 'info', 'isIndependentlyComposed', | |
| 'log', 'profile', 'profileEnd', 'timeEnd', 'timeStamp', 'trace', 'warn' | |
| ]; | |
| methods.forEach(function (name) { | |
| if( !console[name] ) { | |
| console[name] = noOp; | |
| } | |
| }); | |
| }()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment