Created
January 26, 2014 03:43
-
-
Save roman01la/8628082 to your computer and use it in GitHub Desktop.
Get num of HTML nodes
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
c = 0 | |
check = (node) -> | |
if node instanceof HTMLElement || node instanceof HTMLDocument | |
c++ | |
console.log(c) | |
for onode in node.childNodes | |
check(onode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment