mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:47:22 +08:00
FIX: polyfills forEach support on NodeList for IE11 (#8213)
This commit is contained in:
parent
ac06c87b43
commit
2fa3808928
|
@ -356,4 +356,14 @@ if (!String.prototype.repeat) {
|
|||
};
|
||||
}
|
||||
|
||||
// https://developer.mozilla.org/fr/docs/Web/API/NodeList/forEach
|
||||
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);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/* eslint-enable */
|
||||
|
|
Loading…
Reference in New Issue
Block a user