Bug 1610775 [wpt PR 21336] - Update urllib3 to 1.25.8, a=testonly
[gecko.git] / dom / webidl / Animation.webidl
blobd808581c14683937f59593e5b0b51fd57c79a708
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4  * You can obtain one at http://mozilla.org/MPL/2.0/.
5  *
6  * The origin of this IDL file is
7  * https://drafts.csswg.org/web-animations/#animation
8  *
9  * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
10  * liability, trademark and document use rules apply.
11  */
13 enum AnimationPlayState { "idle", "running", "paused", "finished" };
15 enum AnimationReplaceState { "active", "removed", "persisted" };
17 [Exposed=Window]
18 interface Animation : EventTarget {
19   [Throws]
20   constructor(optional AnimationEffect? effect = null,
21               optional AnimationTimeline? timeline);
23   attribute DOMString id;
24   [Func="Document::IsWebAnimationsEnabled", Pure]
25   attribute AnimationEffect? effect;
26   [Func="Document::AreWebAnimationsTimelinesEnabled"]
27   attribute AnimationTimeline? timeline;
28   [BinaryName="startTimeAsDouble"]
29   attribute double? startTime;
30   [SetterThrows, BinaryName="currentTimeAsDouble"]
31   attribute double? currentTime;
33            attribute double             playbackRate;
34   [BinaryName="playStateFromJS"]
35   readonly attribute AnimationPlayState playState;
36   [BinaryName="pendingFromJS"]
37   readonly attribute boolean            pending;
38   [Pref="dom.animations-api.autoremove.enabled"]
39   readonly attribute AnimationReplaceState replaceState;
40   [Func="Document::IsWebAnimationsEnabled", Throws]
41   readonly attribute Promise<Animation> ready;
42   [Func="Document::IsWebAnimationsEnabled", Throws]
43   readonly attribute Promise<Animation> finished;
44            attribute EventHandler       onfinish;
45            attribute EventHandler       oncancel;
46   [Pref="dom.animations-api.autoremove.enabled"]
47            attribute EventHandler       onremove;
48   void cancel();
49   [Throws]
50   void finish();
51   [Throws, BinaryName="playFromJS"]
52   void play();
53   [Throws, BinaryName="pauseFromJS"]
54   void pause();
55   void updatePlaybackRate (double playbackRate);
56   [Throws]
57   void reverse();
58   [Pref="dom.animations-api.autoremove.enabled"]
59   void persist();
60   [Pref="dom.animations-api.autoremove.enabled", Throws]
61   void commitStyles();
64 // Non-standard extensions
65 partial interface Animation {
66   [ChromeOnly] readonly attribute boolean isRunningOnCompositor;