luci-base: cbi.js: add NodeList.forEach() polyfill for IE 11
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
c0de036b31
commit
260d2cc44e
1 changed files with 9 additions and 0 deletions
|
@ -1498,6 +1498,15 @@ String.nobr = function()
|
|||
return ''.nobr.apply(arguments[0], a);
|
||||
}
|
||||
|
||||
if (window.NodeList && !NodeList.prototype.forEach) {
|
||||
NodeList.prototype.forEach = function (callback, thisArg) {
|
||||
thisArg = thisArg || window;
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
callback.call(thisArg, this[i], i, this);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
var dummyElem, domParser;
|
||||
|
||||
|
|
Loading…
Reference in a new issue