Open
Description
This is a side-issue to #9901 where this demo was mentioned.
To make this work, I basically need to hijack all animations and either pause them (when manually updating their currentTime
) or give them non-DocumentTimeline
s (when attaching them to a ScrollTimeline
).
The code to get all these animations is this:
const transition = document.startViewTransition(…);
await transition.ready;
const animations =
document
.getAnimations()
.filter((anim) => {
return anim.effect.target === document.documentElement && anim.effect.pseudoElement?.startsWith("::view-transition")
});
While this works, it’s not very ergonomic. Therefore I’m suggesting something like ViewTransition.getAnimations()
to easily get them:
const transition = document.startViewTransition(…);
await transition.ready;
const animations = transition.getAnimations();
This would also benefit Scoped Transitions, where you can have multiple View Transitions going on at once.
Metadata
Metadata
Assignees
Type
Projects
Status
Thursday afternoon