MDN self-hosted library · e01.org
EventCounts / notebook

EventCounts

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
for (const [type, count] of performance.eventCounts.entries()) {
  console.log(type, count);
}

const clickCount = performance.eventCounts.get("click");

const isExposed = performance.eventCounts.has("mousemove");
const exposedEventsCount = performance.eventCounts.size;
const exposedEventsList = [...performance.eventCounts.keys()];