Created
November 26, 2014 18:26
-
-
Save dosjota/7ca5d6ad0627a5a37365 to your computer and use it in GitHub Desktop.
Evitar error en IE por uso de Console
This file contains 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
if (typeof window.console == "undefined" || typeof window.console.log == "undefined") { | |
window.console = { | |
log: function() { | |
}, | |
info: function() { | |
}, | |
warn: function() { | |
} | |
}; | |
} | |
if (typeof window.console.group == 'undefined' || typeof window.console.groupEnd == 'undefined' || typeof window.console.groupCollapsed == 'undefined') { | |
window.console.group = function() { | |
}; | |
window.console.groupEnd = function() { | |
}; | |
window.console.groupCollapsed = function() { | |
}; | |
} | |
if (typeof window.console.markTimeline == 'undefined') { | |
window.console.markTimeline = function() { | |
}; | |
} | |
window.console.clear = function() { | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment