1
0
mirror of synced 2025-12-19 18:05:19 -05:00
Files
material-keycloak-theme/material/login/resources/js/polyfill/nodelist-foreach.js
2018-05-24 10:05:20 -03:00

11 lines
422 B
JavaScript

// Taken from https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach
// Allows for document.querySelectorAll('.selector').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);
}
};
}