Skip to content

Commit 49501b2

Browse files
rahul-kamatcopybara-github
authored andcommitted
Add KeyframeEffect.getKeyframes() and setKeyframes() to standard JS externs
PiperOrigin-RevId: 563236510
1 parent 73cf670 commit 49501b2

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

externs/browser/web_animations.js

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,58 @@ KeyframeEffectReadOnly.prototype.timing;
165165
*/
166166
var KeyframeEffect = function(target, frames, options) {};
167167

168+
/**
169+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/KeyframeEffect/getKeyframes)
170+
* @public
171+
* @return {!Array<!ComputedKeyframe>}
172+
*/
173+
KeyframeEffect.prototype.getKeyframes = function() {};
174+
175+
/**
176+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/KeyframeEffect/setKeyframes)
177+
* @public
178+
* @param {(null|!PropertyIndexedKeyframes|!Array<!Keyframe>)} keyframes
179+
* @return {void}
180+
*/
181+
KeyframeEffect.prototype.setKeyframes = function(keyframes) {};
182+
183+
/**
184+
* @record
185+
*/
186+
var ComputedKeyframe = function() {};
187+
188+
/** @type {string} */
189+
ComputedKeyframe.prototype.composite;
190+
/** @type {number} */
191+
ComputedKeyframe.prototype.computedOffset;
192+
/** @type {string} */
193+
ComputedKeyframe.prototype.easing;
194+
/** @type {(null|number)} */
195+
ComputedKeyframe.prototype.offset;
196+
197+
/**
198+
* @record
199+
*/
200+
var PropertyIndexedKeyframes = function() {};
201+
202+
/** @type {(undefined|string|!Array<string>)} */
203+
PropertyIndexedKeyframes.prototype.composite;
204+
/** @type {(undefined|string|!Array<string>)} */
205+
PropertyIndexedKeyframes.prototype.easing;
206+
/** @type {(undefined|number|!Array<(null|number)>)} */
207+
PropertyIndexedKeyframes.prototype.offset;
208+
209+
/**
210+
* @record
211+
*/
212+
var Keyframe = function() {};
213+
214+
/** @type {(undefined|string)} */
215+
Keyframe.prototype.composite;
216+
/** @type {(undefined|string)} */
217+
Keyframe.prototype.easing;
218+
/** @type {(undefined|null|number)} */
219+
Keyframe.prototype.offset;
168220

169221
/**
170222
* @record

0 commit comments

Comments
 (0)