enum AnimationPlayState {
"idle",
"running",
"paused",
"finished"
};
enum AnimationReplaceState {
"active",
"removed",
"persisted"
};
[
ActiveDOMObject,
EnabledAtRuntime=WebAnimations,
InterfaceName=Animation,
CustomToJSObject,
ExportMacro=WEBCORE_EXPORT
] interface WebAnimation : EventTarget {
[Custom] constructor();
attribute DOMString id;
[ImplementedAs=bindingsEffect] attribute AnimationEffect? effect;
[RuntimeConditionallyReadWrite=WebAnimationsMutableTimelines] attribute AnimationTimeline? timeline;
[ImplementedAs=bindingsStartTime] attribute double? startTime;
[MayThrowException, ImplementedAs=bindingsCurrentTime] attribute double? currentTime;
attribute double playbackRate;
[ImplementedAs=bindingsPlayState] readonly attribute AnimationPlayState playState;
[ImplementedAs=bindingsReplaceState] readonly attribute AnimationReplaceState replaceState;
[ImplementedAs=bindingsPending] readonly attribute boolean pending;
attribute EventHandler onfinish;
attribute EventHandler oncancel;
attribute EventHandler onremove;
[ImplementedAs=bindingsReady] readonly attribute Promise<WebAnimation> ready;
[ImplementedAs=bindingsFinished] readonly attribute Promise<WebAnimation> finished;
void cancel();
[MayThrowException] void finish();
[MayThrowException, ImplementedAs=bindingsPlay] void play();
[MayThrowException, ImplementedAs=bindingsPause] void pause();
void updatePlaybackRate(double playbackRate);
[MayThrowException, ImplementedAs=bindingsReverse] void reverse();
void persist();
[MayThrowException] void commitStyles();
};