You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[web-animations-1] Add timeline to animate() options (#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. The semantic of handling explicit null and implicit/explicit undefined
timelines are the same between the two methods.
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()});
```
0 commit comments