Created
January 27, 2016 13:20
-
-
Save xiaoda/2b4569bc882c969945d3 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
var wark_the_DOM = function walk(node, func) { | |
func(node); | |
node = node.firstChild; | |
while (node) { | |
walk(node, func); | |
node = node.nextSibling; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment