Skip to content

Instantly share code, notes, and snippets.

@NickelMattera
Created November 15, 2016 14:20
Show Gist options
  • Save NickelMattera/1d0ac659eec8d8ed553eaa65f8b6fc50 to your computer and use it in GitHub Desktop.
Save NickelMattera/1d0ac659eec8d8ed553eaa65f8b6fc50 to your computer and use it in GitHub Desktop.
NodeList forEach Polyfill
if (!NodeList.prototype.forEach) {
NodeList.prototype.forEach = function(callback, argument) {
var array = Array.prototype.slice.call(this);
return array.forEach(callback, argument)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment