Created
April 13, 2017 15:34
-
-
Save olarclara/8bcd21aa9375952da486720964931038 to your computer and use it in GitHub Desktop.
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
// Taken from Douglas Crockford's JavaScript: The Good Parts | |
function walkDOM(node, func) { | |
func(node); | |
node = node.firstChild; | |
while(node) { | |
walkDOM(node, func); | |
node = node.nextSibling; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment