Created
September 22, 2011 08:59
-
-
Save pete-otaqui/1234379 to your computer and use it in GitHub Desktop.
Fake Firebug API, allows safe use of Firebug / Web Inspector commands without breaking IE
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
/** | |
* Create a fake console api, mimicing Firebug. | |
*/ | |
(function(global) { | |
var noop = function(){}; | |
if ( !global['console'] ) { | |
global.console = { | |
log : noop, | |
debug : noop, | |
info : noop, | |
warn : noop, | |
error : noop, | |
assert : noop, | |
clear : noop, | |
dir : noop, | |
dirxml : noop, | |
trace : noop, | |
group : noop, | |
groupCollapsed : noop, | |
groupEnd : noop, | |
time: noop, | |
timeEnd: noop, | |
profile: noop, | |
profileEnd: noop, | |
count: noop, | |
exception: noop, | |
table: noop | |
} | |
} | |
})(window); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment