demo · v144

Interaction Counter

Click, type, drag — the live counter pulls performance.interactionCount each frame. Compare it to the per-entry interactionId list the observer reports, so you can see how the new counter rolls up unique gestures.

support: checking…

performance.interactionCount

unique interactionIds seen

0

the API

const observer = new PerformanceObserver(list => {
  for (const e of list.getEntries()) {
    if (e.interactionId > 0) console.log(e.interactionId, e.name);
  }
});
observer.observe({ type: "event", buffered: true });
performance.interactionCount;  // NEW in 144 — site-wide unique gesture counter

see also