debian-mirror-gitlab/app/assets/javascripts/commons/polyfills/nodelist.js

8 lines
240 B
JavaScript
Raw Normal View History

2018-03-17 18:26:18 +05:30
if (window.NodeList && !NodeList.prototype.forEach) {
NodeList.prototype.forEach = function forEach(callback, thisArg = window) {
for (let i = 0; i < this.length; i += 1) {
callback.call(thisArg, this[i], i, this);
}
};
}