Extend AnimationTimeline to include play()
Categories
(Core :: DOM: Animation, enhancement)
Tracking
()
People
(Reporter: boris, Unassigned)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [scrollanimation:mvp] )
Per spec,
[Exposed=Window]
partial interface AnimationTimeline {
readonly attribute CSSNumberish? currentTime;
readonly attribute CSSNumberish? duration;
Animation play (optional AnimationEffect? effect = null);
};
add play() in this bug.
| Reporter | ||
Comment 1•2 months ago
|
||
Here are more context for this function:
Creates a new Animation object associated with this timeline that begins playback as soon as it is ready.
The new Animation object is created using the Animation() constructor passing this AnimationTimeline object as the timeline parameter and effect as the effect parameter.
Following construction of the Animation object, the procedure to play an animation is performed on the newly constructed object with the auto-rewind flag set to true.
This is pretty similar with our implementation for Element.animate(). We create an animation, and then call Play(). Just need to tweak the timeline part.
If effect is specified, it will be used as the animation’s associated effect.
ISSUE: Need to define the start behavior when effect is null.
Yap, this is the spec issue so we can just follow the current behavior if effect is null, i.e. Animation::mEffect = nullptr.
Updated•2 months ago
|
Description
•