Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You 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());


Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: