htmlroundcubeiredmail

Chrome upload "too fast" for inspecting


I have a stupid problem. I have a page which uses roundcube webmail. When I create a new mail and want to attach a file, there is a <li> element that is appended to a <ul> element while the file is uploading. After the upload is finished the <li> is removed and replaced with another element.

Because of reasons I need to somehow inspect the temporary <li> element. But since it's visible for too short time, I don't have enough time to really check it.

I am using the Roundcube Docker Container, and connecting to a remote iRedMail-server that I have no access to.

I have had the following ideas:

Does anyone have any idea what I can try?


Solution

  • Copy this code to the browser inspector console:

    let count = document.getElementsByTagName('li').length;
    setInterval(() => {
        if (count !== document.getElementsByTagName('li').length) {
            count = document.getElementsByTagName('li').length;
            console.log(document.getElementsByTagName('li'));
        }
    }, 1);
    

    You'll see all the "li"s tag when there's any li tag is added to the DOM, find and check it.

    You can also see all the innerHTML instead of the HTML Element (or attributes) if you replace

    console.log(document.getElementsByTagName('li'));
    

    with

    console.log(Array.from(document.getElementsByTagName('li')).map((item) => item.innerHTML));
    

    Hope this help