Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect INP attribution when using web components #572

Open
kevinfarrugia opened this issue Nov 28, 2024 · 1 comment
Open

Incorrect INP attribution when using web components #572

kevinfarrugia opened this issue Nov 28, 2024 · 1 comment

Comments

@kevinfarrugia
Copy link

When interacting with a web page that uses web components (for example https://todomvc.com/examples/web-components/dist/ or https://todomvc.com/examples/lit/dist/) the interaction target is incorrectly reported as the #shadow-root.

Screenshot of Chrome DevTools showing two interactions that report the #shadow-root as the interaction target

In the preceding screenshot, in the first interaction I interacted with the input.new-todo element (text field) and on the second interaction with the input.toggle (checkbox) element. In both cases, the web-vitals library reported the interaction target as the <todo-app>.

Expected

I would expect that the interaction target matches the same behavior as seen when not using web components.

Screenshot of Chrome DevTools showing two interactions. The first reports an interaction target for input.new-todo. The second interaction reports input.toggle

The preceding screenshot is taken from a plain JavaScript demo, for example https://todomvc.com/examples/javascript-es6/dist/.

@tunetheweb
Copy link
Member

As this comes directly from Event Timing this isn't an issue with the library per se, but more to do with Event Timing and/or Chrome's implementation of that. But prior discussion seems to suggest we should NOT expose the shadow dom elements so it's WAI?

CC: @mmocny

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants