w3c / event-timing

A proposal for an Event Timing specification.
https://w3c.github.io/event-timing/
Other
44 stars 13 forks source link

Replace interactionCounts map-like with a single interactionCount number #125

Closed zuoaoyuan closed 1 year ago

zuoaoyuan commented 1 year ago

This CL replaces interactionCounts map-like with a single interactionCount number representing the number of interactions that have occurred among all types - "keyboard", "drag", and "tap".

Fixes https://github.com/WICG/event-timing/issues/117


Preview | Diff

yoavweiss commented 1 year ago

Does this change align the spec with the Chromium implementation behavior?

mmocny commented 1 year ago

Chromium does not implement this (not the previous or proposed version), but we would like to.

This change to spec was discussed at a WG meeting and based on feedback from INP implementers. I mentioned that in https://github.com/w3c/event-timing/issues/117#issuecomment-1132948940 but I didn't link back to the notes, could dig it up.

I do see an IDL definition for interactionCounts in WPT (https://github.com/web-platform-tests/wpt/blob/4c41b4ec55b296eef7044a7bc0dbc5fc2a1eb50d/interfaces/event-timing.idl#L22) but thats just auto-generated from the spec. There are no tests for it in WPT yet.