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

Add element and/or id fields to PerformanceEventTiming to indicate target of the event #60

Closed
DanShappir opened this issue Oct 7, 2019 · 4 comments

Comments

@DanShappir
Copy link

I propose adding element and/or id fields to PerformanceEventTiming, similar to these fields in LargestContentfulPaint. These fields would indicate the target element of the event that was recorded. Having this information would be very beneficial:

  1. It would make it much easier to identify user interactions that have long delays
  2. In the context of "first-input", it would help determine which code should be loaded first/preload, based on common visitor interactions
  3. Many sites would like to know which elements on the page visitors first interact with, regardless of performance
@npm1
Copy link
Collaborator

npm1 commented Oct 7, 2019

Thanks for the feedback! I agree that this would be useful, and this has been discussed in this issue #9. The main question I guess is whether to expose a single EventTarget or the list of all EventTargets (shadow DOM can cause this to be of length >0). Given shadow DOM encapsulation principles, I suspect that people would be opposed to the latter.

@DanShappir
Copy link
Author

I'm in favor of a single EventTarget

@npm1
Copy link
Collaborator

npm1 commented Jan 21, 2020

Update: we have a concrete plan to add this, which will be a prerequisite for us shipping full Event Timing (for 'discrete' events) in Chrome.

@clelland
Copy link

Looks like this was shipped in Chrome as target; closing this.

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

3 participants