Skip to content

Instantly share code, notes, and snippets.

@leesei-gist
Last active December 17, 2015 23:59
Show Gist options
  • Save leesei-gist/5693175 to your computer and use it in GitHub Desktop.
Save leesei-gist/5693175 to your computer and use it in GitHub Desktop.
JavaScript: IE console shim
// god-damn IE (~=9) will not expose console if developer tool is not opened
// causing runtime error to scripts
(function (window) {
if (!window.console) window.console = {};
if (!window.console.log) window.console.log = function () {};
})(window);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment