• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright 2016 Google Inc. All rights reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 * use this file except in compliance with the License. You may obtain a copy of
6 * the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 * License for the specific language governing permissions and limitations under
14 * the License.
15 */
16
17
18/**
19 * @fileoverview Basic externs for the Web Animations API (Level 2 / Groups).
20 * This is not intended to be exhaustive, and requires the base externs from
21 * web-animations.js.
22 * @externs
23 */
24
25
26/**
27 * @interface
28 */
29var AnimationEffectReadOnly = function() {};
30
31/** @type {!AnimationEffectTiming} */
32AnimationEffectReadOnly.prototype.timing;
33
34
35/**
36 * @param {Element} target
37 * @param {!Array<!Object>} frames
38 * @param {(number|AnimationEffectTimingProperties)=} opt_options
39 * @constructor
40 * @implements {AnimationEffectReadOnly}
41 */
42var KeyframeEffect = function(target, frames, opt_options) {};
43
44/**
45 * @return {!Array<!Object>}
46 */
47KeyframeEffect.prototype.getFrames = function() {};
48
49/** @type {!AnimationEffectTiming} */
50KeyframeEffect.prototype.timing;
51
52/** @type {Element} */
53KeyframeEffect.prototype.target;
54
55/** @type {?function(number, !KeyframeEffect, !Animation)} */
56KeyframeEffect.prototype.onsample;
57
58
59/**
60 * @param {!Array<!AnimationEffectReadOnly>} children
61 * @param {AnimationEffectTimingProperties=} opt_timing
62 * @constructor
63 * @implements {AnimationEffectReadOnly}
64 */
65var SequenceEffect = function(children, opt_timing) {};
66
67/** @type {!AnimationEffectTiming} */
68SequenceEffect.prototype.timing;
69
70/** @type {!Array<!AnimationEffectReadOnly>} */
71SequenceEffect.prototype.children;
72
73
74/**
75 * @param {!Array<!AnimationEffectReadOnly>} children
76 * @param {AnimationEffectTimingProperties=} opt_timing
77 * @constructor
78 * @implements {AnimationEffectReadOnly}
79 */
80var GroupEffect = function(children, opt_timing) {};
81
82/** @type {!AnimationEffectTiming} */
83GroupEffect.prototype.timing;
84
85/** @type {!Array<!AnimationEffectReadOnly>} */
86GroupEffect.prototype.children;
87
88
89/**
90 * @interface
91 */
92var AnimationTimeline = function() {};
93
94/** @type {?number} */
95AnimationTimeline.prototype.currentTime;
96
97/**
98 * @param {!AnimationEffectReadOnly} effect
99 * @return {!Animation}
100 */
101AnimationTimeline.prototype.play = function(effect) {};
102
103/**
104 * @interface
105 * @extends {AnimationTimeline}
106 */
107var DocumentTimeline = function() {};
108
109/** @type {AnimationEffectReadOnly|undefined} */
110Animation.prototype.effect;
111
112/** @type {!DocumentTimeline} */
113Document.prototype.timeline;
114