SOURCE


function echoP(str) {
    const p = document.createElement('p');
    p.innerText = str;
    document.body.appendChild(p);
}


const ua = navigator.userAgent;
echoP(ua);

const observer = new PerformanceObserver((entryList) => {
    echoP(entryList.getEntries().length);
    for (const {name, startTime} of entryList.getEntries()) {
        echoP(name + ': ' + startTime);
    }
});

observer.observe({
    entryTypes: ['navigation', 'paint']
});
console 命令行工具 X clear

                    
>
console