Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: third_party/closure_compiler/externs/web_animations.js

Issue 1736733003: MD Settings: Custom expand/collapse section animations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/closure_compiler/externs/compiled_resources2.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview Minimal Closure externs for Web Animations.
7 * "Minimal" because the web-animations spec is in flux, Chromium's support is
8 * changing, and the intended consumer (MD Settings) is actually using the
9 * web-animations-js polyfill for the time being.
Dan Beam 2016/03/14 21:27:53 can you add @see <link> for this file and any part
michaelpg 2016/03/15 00:06:50 Done.
10 */
11
12 /**
13 * @enum {number}
14 */
Dan Beam 2016/03/14 21:27:53 nit: almost all of these short jsdoc comments can
michaelpg 2016/03/15 00:06:50 Done.
15 var FillMode = {
16 'none': 0,
17 'forwards': 1,
18 'backwards': 2,
19 'both': 3,
20 'auto': 4
21 };
22
23 /**
24 * @enum {number}
25 */
26 var PlaybackDirection = {
27 'normal': 0,
28 'reverse': 1,
29 'alternate': 2,
30 'alternate-reverse': 3
31 };
32
33 /**
34 * @constructor
35 * @param {!Event} event
36 */
37 var EventHandlerNonNull = function(event) {};
38
39 /**
40 * @typedef {?EventHandlerNonNull}
41 */
42 var EventHandler;
43
44 /**
45 * @constructor
46 */
47 var KeyframeAnimationOptions = function() {};
48
49 /**
50 * @constructor
51 */
52 var KeyframeEffectOptions = function() {};
53
54 /**
55 * @type {number}
56 */
57 KeyframeEffectOptions.prototype.delay = 0;
Dan Beam 2016/03/14 21:27:53 one advantage of the .prototype.* route is that yo
michaelpg 2016/03/15 00:06:50 Ok, but then why not extend this logic to function
Dan Beam 2016/03/16 00:23:14 suppose that's OK, too, as long as you can name an
michaelpg 2016/03/16 03:11:15 Yeah it seems to work just the same. I'll keep it
58
59 /**
60 * @type {number}
61 */
62 KeyframeEffectOptions.prototype.endDelay = 0;
63
64 /**
65 * @type {!FillMode}
66 */
67 KeyframeEffectOptions.prototype.fill = FillMode.auto;
68
69 /**
70 * @type {number}
71 */
72 KeyframeEffectOptions.prototype.iterationStart = 0;
73
74 /**
75 * @type {number}
76 */
77 KeyframeEffectOptions.prototype.iterations = 1;
78
79 /**
80 * @type {number|string}
81 */
82 KeyframeEffectOptions.prototype.duration = 'auto';
83
84 /**
85 * @type {number}
86 */
87 KeyframeEffectOptions.prototype.playbackRate = 1;
88
89 /**
90 * @type {!PlaybackDirection}
91 */
92 KeyframeEffectOptions.prototype.direction = PlaybackDirection.normal;
93
94 /**
95 * @type {string}
96 */
97 KeyframeEffectOptions.prototype.easing = 'linear';
98
99 /**
100 * @type {string}
101 */
102 KeyframeEffectOptions.prototype.id = '';
103
104 /**
105 * @interface
106 * @extends {EventTarget}
107 */
108 var Animation = function() {};
109
110 /**
111 * @type {string}
112 */
113 Animation.prototype.id;
114
115 /**
116 * @type {?number}
117 */
118 Animation.prototype.startTime;
119
120 /**
121 * @type {?number}
122 */
123 Animation.prototype.currentTime;
124
125 /**
126 * @type {number}
127 */
128 Animation.prototype.playbackRate;
129
130 Animation.prototype.finish = function() {};
131
132 Animation.prototype.play = function() {};
133
134 Animation.prototype.pause = function() {};
135
136 Animation.prototype.reverse = function() {};
137
138 Animation.prototype.cancel = function() {};
139
140 /**
141 * @param {boolean=} opt_useCapture
142 * @override
143 */
144 Animation.prototype.addEventListener = function(
145 type, listener, opt_useCapture) {};
146
147 /**
148 * @type {EventHandler}
149 */
150 Animation.prototype.onfinish;
151
152 /**
153 * @type {EventHandler}
154 */
155 Animation.prototype.oncancel;
156
157 /**
158 * @interface
159 */
160 function Animatable() {};
Dan Beam 2016/03/14 21:27:53 no ;
michaelpg 2016/03/15 00:06:50 Done.
161
162 Animatable.prototype = /** @lends {Element.prototype} */({
Dan Beam 2016/03/14 21:27:53 til: @lends is a thing
163 /**
164 * @param {?Array<Object>|Object} effect
165 * @param {number|!KeyframeEffectOptions=} opt_timing
166 * @return {!Animation}
167 */
168 animate: function(effect, opt_timing) {},
169 });
OLDNEW
« no previous file with comments | « third_party/closure_compiler/externs/compiled_resources2.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698