I’m sure this is simple but I have no idea how to do it.
How do i count the amount of DOM elements in my HTML page? I wanted to do this in a userscript or bookmarklet but i have no idea how to start!
I’m sure this is simple but I have no idea how to do it.
Share
Use this for
Elementnodes:For any node, you can extend
Nodelike this:Then all you need to do is to call
document.countChildNodes.