Last active
December 21, 2016 06:13
-
-
Save Daniel-Hug/2cdfeee2eec69e91b010f899ec315934 to your computer and use it in GitHub Desktop.
JS function: get array of descendant elements. Source: http://stackoverflow.com/a/17821774/552067
This file contains 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
// get array of descendant elements | |
function getDescendantElements(parent) { | |
return [].slice.call(parent.getElementsByTagName('*')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment