Skip to content

Instantly share code, notes, and snippets.

@nwillc
Last active May 30, 2018 02:27
Show Gist options
  • Save nwillc/6897ab0e3addcad3641317c8d4359cab to your computer and use it in GitHub Desktop.
Save nwillc/6897ab0e3addcad3641317c8d4359cab to your computer and use it in GitHub Desktop.
Looping over a nodelist
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