const observer = new PerformanceObserver((list) => {
list.getEntries().forEach((entry) => {
if (!entry.cancelable) {
const delay = entry.processingStart - entry.startTime;
console.log(entry.name, delay);
}
});
});
// Register the observer for events
observer.observe({ type: "event", buffered: true });PerformanceEventTiming: cancelable property / notebook
PerformanceEventTiming: cancelable property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.