Skip to content

Conversation

@majido
Copy link
Contributor

@majido majido commented Apr 30, 2020

Fixes #5013

The options dictionary in Element.animate now has an optional nullable timeline
member. This allows timeline to be set via that method in addition to Animation
constructor.

Here are some examples of how this may be used:

// Create animation with a null timeline.
div.animate({color: 'red' }, { duration: 1000, timeline: null});
// Create a scroll-linked animation.
div.animate({color: 'red' }, { duration: 1000, timeline: new ScrollTimeline()});

Copy link
Contributor

@birtles birtles 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. Thanks!

@majido majido merged commit 88aafc3 into w3c:master May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[web-animations-1] Allow setting timeline in Element.animate()

2 participants