Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@olegchir
Created April 1, 2020 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olegchir/44c6296d00bce8c0f5ed46d0d38cd2a4 to your computer and use it in GitHub Desktop.
Save olegchir/44c6296d00bce8c0f5ed46d0d38cd2a4 to your computer and use it in GitHub Desktop.
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);
}
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment