展示
输出结果是:
代码
JS代码:
const observer = new PerformanceObserver(entryList => { for (const entry of entryList.getEntries()) { const strEntry = JSON.stringify(entry); console.dir(entry); } }); observer.observe({ entryTypes: ['first-input'] });
const observer = new PerformanceObserver(entryList => { for (const entry of entryList.getEntries()) { const strEntry = JSON.stringify(entry); console.dir(entry); } }); observer.observe({ entryTypes: ['first-input'] });