Skip to content

Instantly share code, notes, and snippets.

@dana-ross
Created May 18, 2020 14:06
Show Gist options
  • Save dana-ross/7107bff1aeb7282279362751f56ca9e6 to your computer and use it in GitHub Desktop.
Save dana-ross/7107bff1aeb7282279362751f56ca9e6 to your computer and use it in GitHub Desktop.
Find nodes with > 60 children
function x(n) {
if(n.children.length > 60) {
console.log(n)
}
Array.from(n.children).forEach(x)
}
x(document.getElementsByTagName('html')[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment