GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • MDN
  • HTML: Markup language
  • Elements
  • Global attributes
  • Attributes
  • See all…
  • Responsive images
  • HTML cheatsheet
  • Date & time formats
  • See all…
  • SVG
  • MathML
  • XML
  • CSS: Styling language

This view

  • Original page
  • New address

GeezerVison is showing developer.mozilla.org — EventCounts - Web APIs | MDN

EventCounts

Baseline 2025
Newly available

Since December 2025, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

  • See full compatibility
  • Learn more

The EventCounts interface of the Performance API provides the number of events that have been dispatched for each event type.

An EventCounts instance is a read-only Map-like object, in which each key is the name string for an event type, and the corresponding value is an integer indicating the number of events that have been dispatched for that event type.

Constructor

This interface has no constructor. You typically get an instance of this object using the performance.eventCounts property.

Instance properties

size

See Map.prototype.size for details.

Instance methods

entries()

See Map.prototype.entries() for details.

forEach()

See Map.prototype.forEach() for details.

get()

See Map.prototype.get() for details.

has()

See Map.prototype.has() for details.

keys()

See Map.prototype.keys() for details.

values()

See Map.prototype.values() for details.

Examples

Working with EventCount maps

Below are a few examples to get information from an EventCounts map. Note that the map is read-only and the clear(), delete(), and set() methods aren't available.

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()];

Specifications

Specification
Event Timing API
# sec-event-counts

Browser compatibility

See also

  • performance.eventCounts
  • PerformanceEventTiming
  • Map

Help improve MDN

Learn how to contribute

This page was last modified on Nov 6, 2026 by MDN contributors.

View this page on GitHub • Report a problem with this content
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.