OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 10 matching lines...) Expand all Loading... | |
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 // http://www.w3.org/TR/web-animations/#the-animationplayer-interface | |
32 | |
33 // TODO(dstockwell): This interface has been renamed to Animation in the latest | |
34 // spec, where it is no longer an EventTarget and has other changes: | |
dstockwell
2015/04/20 13:32:24
It will be an EventTarget again: https://github.co
| |
35 // https://w3c.github.io/web-animations/#the-animation-interface | |
36 | |
31 enum AnimationPlayState { "idle", "pending", "running", "paused", "finished" }; | 37 enum AnimationPlayState { "idle", "pending", "running", "paused", "finished" }; |
32 | 38 |
33 [ | 39 [ |
34 ActiveDOMObject, | 40 ActiveDOMObject, |
35 NoInterfaceObject, | 41 NoInterfaceObject, |
36 ] interface AnimationPlayer : EventTarget { | 42 ] interface AnimationPlayer : EventTarget { |
37 [RuntimeEnabled=WebAnimationsAPI] attribute AnimationNode? source; | 43 [RuntimeEnabled=WebAnimationsAPI] attribute AnimationNode? source; |
38 [Measure] attribute double? startTime; | 44 [Measure] attribute double? startTime; |
39 [Measure] attribute double? currentTime; | 45 [Measure] attribute double? currentTime; |
40 [Measure] attribute double playbackRate; | 46 [Measure] attribute double playbackRate; |
41 [Measure] readonly attribute AnimationPlayState playState; | 47 [Measure] readonly attribute AnimationPlayState playState; |
42 [Measure, RaisesException] void finish(); | 48 [Measure, RaisesException] void finish(); |
43 [Measure] void play(); | 49 [Measure] void play(); |
44 [Measure] void pause(); | 50 [Measure] void pause(); |
45 [Measure] void reverse(); | 51 [Measure] void reverse(); |
46 | 52 |
47 [Measure] void cancel(); | 53 [Measure] void cancel(); |
48 [Measure] attribute EventHandler onfinish; | 54 [Measure] attribute EventHandler onfinish; |
49 [RuntimeEnabled=WebAnimationsAPI, CallWith=ScriptState] readonly attribute P romise<AnimationPlayer> finished; | 55 [RuntimeEnabled=WebAnimationsAPI, CallWith=ScriptState] readonly attribute P romise<AnimationPlayer> finished; |
50 [RuntimeEnabled=WebAnimationsAPI, CallWith=ScriptState] readonly attribute P romise<AnimationPlayer> ready; | 56 [RuntimeEnabled=WebAnimationsAPI, CallWith=ScriptState] readonly attribute P romise<AnimationPlayer> ready; |
51 }; | 57 }; |
OLD | NEW |