Last active
May 30, 2018 02:27
-
-
Save nwillc/6897ab0e3addcad3641317c8d4359cab to your computer and use it in GitHub Desktop.
Looping over a nodelist
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
for (i in 0 .. (nodelist.length - 1)) { | |
if (nodelist.item(i).nodeType == Node.ELEMENT_NODE) { | |
return nodelist.item(i) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment