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
The four properties for range seem a bit overwhelming, but this should follow current syntax for rangeStart/End for scroll-driven animations. Perhaps it's worth to consider only 2 properties like: range and exitRange that will take the shorthand form?
Notice I overloaded the Animation constructor's signature with a property bag as a second parameter, instead of an AnimationTimeline. The idea is that, if possible, we could overload it to accept either a timeline, or a dict with optional properties, currently timeline and trigger.
This is a followup on #8942, looking a bit ahead and proposing an imperative syntax for
animation-trigger
in Web Animation API.The main idea is to introduce a new class
AnimationTrigger
that takes anoptions
object, as below:And the the following example in CSS:
becomes this in JS:
The four properties for range seem a bit overwhelming, but this should follow current syntax for rangeStart/End for scroll-driven animations. Perhaps it's worth to consider only 2 properties like:
range
andexitRange
that will take the shorthand form?Then, usage with
Animation
could be:Notice I overloaded the
Animation
constructor's signature with a property bag as a second parameter, instead of anAnimationTimeline
. The idea is that, if possible, we could overload it to accept either a timeline, or a dict with optional properties, currentlytimeline
andtrigger
.Or, alternatively, via
.animate()
:cc: @flackr @birtles
The text was updated successfully, but these errors were encountered: