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

LibWeb: Define PerformanceEventTiming #1490

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

noahmbright
Copy link
Contributor

@noahmbright noahmbright commented Sep 22, 2024

https://www.w3.org/TR/event-timing/#sec-performance-event-timing

Add idl, header and stubs for PerformanceEventTiming interface.

Two missing PerformanceEntry types that have come up in issues are the first-input (#226) and the event (#1298) entryTypes. Those are both this.

Also, because both of those are this same interface, the static methods from the parent class are difficult to implement because of instance-specific details. Might either need subclasses or to edit the parent and also everything that inherits from it :/

https://www.w3.org/TR/event-timing/#sec-performance-event-timing

Add idl, header and stubs for PerformanceEventTiming interface.

Two missing `PerformanceEntry` types that have come up in issues
are the `first-input` and the `event` entryTypes. Those are both
this.

Also, because both of those are this same interface, the static
methods from the parent class are difficult to implement because
of instance-specific details. Might either need subclasses or to
edit the parent and also everything that inherits from it :/

// https://www.w3.org/TR/event-timing/#sec-init-event-timing
PerformanceEventTiming::PerformanceEventTiming(JS::Realm& realm, String const& name, HighResolutionTime::DOMHighResTimeStamp start_time, HighResolutionTime::DOMHighResTimeStamp duration,
DOM::Event event, HighResolutionTime::DOMHighResTimeStamp processing_start, unsigned long long interaction_id)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, how are we taking a DOM::Event by value here? It inherits from JS::Cell which is noncopyable. What's going on?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't explain why this compiles, but I can file an issue and change this to a DOM:: Event const&, which was an oversight on my part anyway.

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

Successfully merging this pull request may close these issues.

2 participants