Feature Request: Expose getInteractionCount
performance.interactionCount isn't officially supported or widely available, it'd be great if web-vitals exposed getInteractionCount (and either call initInteractionCountPolyfill at the top of getInteractionCount or expose initInteractionCountPolyfill as well). Doing this would allow a standard way to get interaction counts when trying to compute total interactions vs slow actions for inp.
On a somewhat related note, I see that interactionCountEstimate assumes that the interactionIds increment by 7, does this break down for non-chromium browsers?
In case it helps: performance.interactionCount is part of Interop 2025 for INP and Chromium has an implementation behind a flag that just needs some shepherding to finally launch.
@mmocny, that's great to hear, but users on older browsers or browsers that don't support performance.interactionCount still won't work...
Is there any opposition to exposing the function? It should be pretty straightforward and in the case where performance.interactionCount is supported it's practically a no-op. Also, doing so would make #629 request moot from my standpoint since it more efficiently solves the problem
Is there any opposition to exposing the function?
I'd rather not expose the function, since it's a short-term issue (that admittedly has lived longer than we thought it would, but has an end in sight now), and a relatively simple-function to replicate if anyone wishes to calculate this. It also depends on the magic number of 7 which, as you say, is implementation specific and not specified.
Closing as not planned.