From 49501b243680eff83a19360429ed937ba8d91827 Mon Sep 17 00:00:00 2001 From: Rahul Kamat Date: Wed, 6 Sep 2023 15:40:53 -0700 Subject: [PATCH] Add KeyframeEffect.getKeyframes() and setKeyframes() to standard JS externs PiperOrigin-RevId: 563236510 --- externs/browser/web_animations.js | 52 +++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/externs/browser/web_animations.js b/externs/browser/web_animations.js index fd9f055dc23..6269d482359 100644 --- a/externs/browser/web_animations.js +++ b/externs/browser/web_animations.js @@ -165,6 +165,58 @@ KeyframeEffectReadOnly.prototype.timing; */ var KeyframeEffect = function(target, frames, options) {}; +/** + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/KeyframeEffect/getKeyframes) + * @public + * @return {!Array} + */ +KeyframeEffect.prototype.getKeyframes = function() {}; + +/** + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/KeyframeEffect/setKeyframes) + * @public + * @param {(null|!PropertyIndexedKeyframes|!Array)} keyframes + * @return {void} + */ +KeyframeEffect.prototype.setKeyframes = function(keyframes) {}; + +/** + * @record + */ +var ComputedKeyframe = function() {}; + +/** @type {string} */ +ComputedKeyframe.prototype.composite; +/** @type {number} */ +ComputedKeyframe.prototype.computedOffset; +/** @type {string} */ +ComputedKeyframe.prototype.easing; +/** @type {(null|number)} */ +ComputedKeyframe.prototype.offset; + +/** + * @record + */ +var PropertyIndexedKeyframes = function() {}; + +/** @type {(undefined|string|!Array)} */ +PropertyIndexedKeyframes.prototype.composite; +/** @type {(undefined|string|!Array)} */ +PropertyIndexedKeyframes.prototype.easing; +/** @type {(undefined|number|!Array<(null|number)>)} */ +PropertyIndexedKeyframes.prototype.offset; + +/** + * @record + */ +var Keyframe = function() {}; + +/** @type {(undefined|string)} */ +Keyframe.prototype.composite; +/** @type {(undefined|string)} */ +Keyframe.prototype.easing; +/** @type {(undefined|null|number)} */ +Keyframe.prototype.offset; /** * @record