MCPcopy
hub / github.com/ampproject/amphtml / animate_

Method animate_

third_party/subscriptions-project/swg.js:11249–11263  ·  view source on GitHub ↗

* @param {function():!Promise} callback * @return {!Promise} * @private

(callback)

Source from the content-addressed store, hash-verified

11247 * @private
11248 */
11249 animate_(callback) {
11250 const wait = this.animating_ || Promise.resolve();
11251 return (this.animating_ = wait
11252 .then(
11253 () => {
11254 return callback();
11255 },
11256 () => {
11257 // Ignore errors to make sure animations don't get stuck.
11258 }
11259 )
11260 .then(() => {
11261 this.animating_ = null;
11262 }));
11263 }
11264
11265 /**
11266 * Returns maximum allowed height for current viewport.

Callers 3

closeMethod · 0.95
show_Method · 0.95
resizeViewMethod · 0.95

Calls 3

resolveMethod · 0.80
callbackFunction · 0.50
thenMethod · 0.45

Tested by

no test coverage detected