mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 06:14:25 +02:00
Workaround for apply missing in IE console (native object vs function)
This commit is contained in:
parent
927b0a7ae7
commit
090974401c
@ -16,3 +16,28 @@
|
||||
|
||||
})(Object);
|
||||
|
||||
(function (console) {
|
||||
|
||||
'use strict';
|
||||
|
||||
if ('undefined' === console) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fix console for IE9, TBD: test IE8 */
|
||||
if (typeof console.log == 'object' && Function.prototype.bind && console) {
|
||||
[
|
||||
'log',
|
||||
'info',
|
||||
'warn',
|
||||
'error',
|
||||
'assert',
|
||||
'dir',
|
||||
'clear',
|
||||
'profile',
|
||||
'profileEnd'
|
||||
].forEach(function (method) {
|
||||
console[method] = this.call(console[method], console);
|
||||
}, Function.prototype.bind);
|
||||
}
|
||||
})(console);
|
||||
|
Loading…
x
Reference in New Issue
Block a user