2 ms·
> Talking layer of DOM nodes, I actually did a few samples of this the other day. Is there a tool for this? I’m kind of wanting to check my site now…
by thex10 4y ago
> Talking layer of DOM nodes, I actually did a few samples of this the other day.
Is there a tool for this? I’m kind of wanting to check my site now…
- nicoburns 4y agoYou can run the following snippet in the console: function getMaxNestLevel() { var i = 1, sel = '* > *'; /* html > body is always present */ while(document.querySelector(sel)) { sel += ' > *'; i++; } return i; } console.log('total nodes', document.getElementsByTagName('*').length); console.log('max nest level', getMaxNestLevel());