Skip to content

Record task-like timing in fire an event#1462

Open
noamr wants to merge 4 commits into
mainfrom
fire-event-pseudo-task
Open

Record task-like timing in fire an event#1462
noamr wants to merge 4 commits into
mainfrom
fire-event-pseudo-task

Conversation

@noamr
Copy link
Copy Markdown
Contributor

@noamr noamr commented Apr 16, 2026

This allows clustering a "fire an event" timeframe in terms of frame timing monitoring, as opposed to relying on an "implicit document", which is a deprecated and non-interoperable term.

The implication of this is that if this event firing schedules a render that ends up as a long animation frame, the whole event firing duration would be counted towards this performance entry, regardless of "tasks".

This is already how long animation frames behave in the chromium implementation and should be unobservable from the previous spec wording that relied on "implicit document".

See w3c/long-animation-frames#36

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

Together with w3c/long-animation-frames#37

This allows clustering a "fire an event" timeframe in terms of
frame timing monitoring, as opposed to relying on an "implicit document", which
is a deprecated and non-interoperable term.

The implication of this is that if this event firing schedules a render that ends up
as a long animation frame, the whole event firing duration would be counted towards this
performance entry, regardless of "tasks".

See w3c/long-animation-frames#36
Copy link
Copy Markdown
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

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

OP isn't filled out.

Comment thread dom.bs Outdated
Comment thread dom.bs
noamr and others added 3 commits May 21, 2026 16:01
Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
@noamr
Copy link
Copy Markdown
Contributor Author

noamr commented May 21, 2026

@smaug---- can I enlist mozilla as interested in this? This is done after our conversation to enable some bits of long animation frames for gecko.

Copy link
Copy Markdown
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

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

Looks good modulo nit. Can land once OP is done.

Comment thread dom.bs

<ol>
<li><p>Let <var>recordingTimingAsTask</var> be the result of calling <a>start recording task time if
needed</a> given <var>target</var>'s <a>relevant settings object</a>.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh also this contains a newline inside phrasing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants