Interface AnimateWAAPI
interface AnimateWAAPI {
debounce?: number;
duration?: number;
enabled?: boolean;
event?: keyof HTMLElementEventMap;
keyframeOptions?: KeyframeAnimationOptions;
keyframes: Keyframe[] | PropertyIndexedKeyframes;
strategy?: "exclusive" | "cancel";
}
debounce?: number;
duration?: number;
enabled?: boolean;
event?: keyof HTMLElementEventMap;
keyframeOptions?: KeyframeAnimationOptions;
keyframes: Keyframe[] | PropertyIndexedKeyframes;
strategy?: "exclusive" | "cancel";
}
Properties
Optionaldebounce
debounce?: number
Add a debounce to incoming events in milliseconds. Consider using the exclusive strategy.
Optionalduration
duration?: number
Duration in milliseconds. Default value: 600.
Optionalenabled
enabled?: boolean
Is the animation enabled. Default value: true.
Optionalevent
DOM event name to bind element to respond with the WAAPI animation. Default value: click.
OptionalkeyframeOptions
An object containing one or more timing properties. When defined it is used instead of duration.
keyframes
An array of keyframe objects or a keyframe object whose properties are arrays of values to iterate over.
Optionalstrategy
strategy?: "exclusive" | "cancel"
The scheduling strategy to take. cancel to cancel any current animation, exclusive to skip scheduling an
animation if one is currently running. Default value: cancel.
Defines the options for the animateWAAPI action.
See