2 * Copyright 2011 The Closure Compiler Authors
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 * @fileoverview Definitions for timing control for script base animations. The
18 * whole file has been fully type annotated.
20 * @see http://www.w3.org/TR/animation-timing/
21 * @see http://webstuff.nfshost.com/anim-timing/Overview.html
26 * @param {function(number)} callback
27 * @param {Element=} opt_element In early versions of this API, the callback
28 * was invoked only if the element was visible.
31 function requestAnimationFrame(callback, opt_element) {};
34 * @param {number} handle
36 function cancelRequestAnimationFrame(handle) {};
39 * @param {function(number)} callback
40 * @param {Element=} opt_element
43 function webkitRequestAnimationFrame(callback, opt_element) {};
46 * @param {number} handle
48 function webkitCancelRequestAnimationFrame(handle) {};
51 * @param {number} handle
53 function webkitCancelAnimationFrame(handle) {};
56 * @param {?function(number)} callback It's legitimate to pass a null
57 * callback and listen on the MozBeforePaint event instead.
58 * @param {Element=} opt_element
61 function mozRequestAnimationFrame(callback, opt_element) {};
64 * @param {number} handle
66 function mozCancelRequestAnimationFrame(handle) {};
69 * @param {number} handle
71 function mozCancelAnimationFrame(handle) {};
74 * @param {function(number)} callback
75 * @param {Element=} opt_element
78 function msRequestAnimationFrame(callback, opt_element) {};
81 * @param {number} handle
83 function msCancelRequestAnimationFrame(handle) {};
86 * @param {number} handle
88 function msCancelAnimationFrame(handle) {};
91 * @param {function(number)} callback
92 * @param {Element=} opt_element
95 function oRequestAnimationFrame(callback, opt_element) {};
98 * @param {number} handle
100 function oCancelRequestAnimationFrame(handle) {};
103 * @param {number} handle
105 function oCancelAnimationFrame(handle) {};
108 * @param {function(number)} callback
109 * @param {Element=} opt_element
112 Window.prototype.requestAnimationFrame = function(callback, opt_element) {};
115 * @param {number} handle
117 Window.prototype.cancelRequestAnimationFrame = function(handle) {};
120 * @param {number} handle
122 Window.prototype.cancelAnimationFrame = function(handle) {};
125 * @param {function(number)} callback
126 * @param {Element=} opt_element
129 Window.prototype.webkitRequestAnimationFrame = function(callback, opt_element) {};
132 * @param {number} handle
134 Window.prototype.webkitCancelRequestAnimationFrame = function(handle) {};
137 * @param {number} handle
139 Window.prototype.webkitCancelAnimationFrame = function(handle) {};
142 * @param {?function(number)} callback It's legitimate to pass a null
143 * callback and listen on the MozBeforePaint event instead.
144 * @param {Element=} opt_element
147 Window.prototype.mozRequestAnimationFrame = function(callback, opt_element) {};
150 * @param {number} handle
152 Window.prototype.mozCancelRequestAnimationFrame = function(handle) {};
155 * @param {number} handle
157 Window.prototype.mozCancelAnimationFrame = function(handle) {};
160 * @param {function(number)} callback
161 * @param {Element=} opt_element
164 Window.prototype.msRequestAnimationFrame = function(callback, opt_element) {};
167 * @param {number} handle
169 Window.prototype.msCancelRequestAnimationFrame = function(handle) {};
172 * @param {number} handle
174 Window.prototype.msCancelAnimationFrame = function(handle) {};
177 * @param {function(number)} callback
178 * @param {Element=} opt_element
181 Window.prototype.oRequestAnimationFrame = function(callback, opt_element) {};
184 * @param {number} handle
186 Window.prototype.oCancelRequestAnimationFrame = function(handle) {};
189 * @param {number} handle
191 Window.prototype.oCancelAnimationFrame = function(handle) {};