Skip to content

Instantly share code, notes, and snippets.

@FLasH3r
Created October 21, 2013 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FLasH3r/7083159 to your computer and use it in GitHub Desktop.
Save FLasH3r/7083159 to your computer and use it in GitHub Desktop.
Console fallback for IE
if (typeof console === "undefined") {
var m = "assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),
console = { },
mt = function () {};
for (var i = 0, len = m.length; i < len; i++) { console[m[i]] = mt; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment