Browse Source

Fixes console log methods for IE9

Yury Delendik 13 years ago
parent
commit
d1e017cc5e
  1. 13
      web/compatibility.js

13
web/compatibility.js

@ -376,7 +376,18 @@ @@ -376,7 +376,18 @@
// Check console compatability
(function checkConsoleCompatibility() {
if (typeof console == 'undefined') {
console = {log: function() {}};
console = {
log: function() {},
error: function() {}
};
} else if (!('bind' in console.log)) {
// native functions in IE9 might not have bind
console.log = (function(fn) {
return function(msg) { return fn(msg); }
})(console.log);
console.error = (function(fn) {
return function(msg) { return fn(msg); }
})(console.error);
}
})();

Loading…
Cancel
Save