Created
November 15, 2016 14:20
-
-
Save NickelMattera/1d0ac659eec8d8ed553eaa65f8b6fc50 to your computer and use it in GitHub Desktop.
NodeList forEach Polyfill
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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