Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
console.log messages in code are bad for Internet Explorer <= 9. This plugin would avoid the application from crashing when console.log messages are present in the javascript code.
;(function () {
// console.log statements cause issues in Internet Explorer <= 9.
// This piece of code prevents the application to fail
// Source for console:
var fns = [
var funcName,
var noop = function () {};
if (!window.console) {
window.console = {};
while (funcName = fns.pop()) {
window.console[funcName] = noop;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment