Skip to content

[css-animations] What should Event.timeStamp be for animation / transition events? #9167

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

Open
emilio opened this issue Aug 6, 2023 · 1 comment
Labels
css-animations-1 Current Work

Comments

@emilio
Copy link
Collaborator

emilio commented Aug 6, 2023

These events have a weird lifetime, and there are various times involved:

  • The time the event was supposed to happen (e.g., the theoretical animation end).
  • The time the event is enqueued.
  • The time the event is dispatched.

I think per spec right now the timeStamp should be the time the event is enqueued, but should it be? Do we want to expose this time? If so it might be worth calling it out in the spec.

There are no tests for this at all afaics.

cc @birtles @flackr

@emilio emilio added the css-animations-1 Current Work label Aug 6, 2023
@birtles
Copy link
Contributor

birtles commented Aug 7, 2023

Yes, I agree that in the absence of any particular spec text here it should be when the event is enqueued.

For what it's worth, we already have the concept of the scheduled event time which we use for sorting events queued at the same time. I think we could use that for the timeStamp if it's more useful to authors but I can't recall the implications of doing that.

Would it be weird if animation and transitions events appeared to be out of order compared to other non-animation events based on their timeStamps?

Also, I think animation events from scroll-based animations have no scheduled event time so we'd have to decide what timeStamp they get.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-animations-1 Current Work
Projects
None yet
Development

No branches or pull requests

2 participants