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

Method close

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

* Closes the toast. * @return {!Promise}

()

Source from the content-addressed store, hash-verified

12018 * @return {!Promise}
12019 */
12020 close() {
12021 return this.animate_(() => {
12022 // Remove the toast from the DOM after animation is complete.
12023 this.doc_.getWin().setTimeout(() => {
12024 this.doc_.getBody().removeChild(this.iframe_);
12025 return Promise.resolve();
12026 }, 500);
12027
12028 return transition$1(
12029 this.iframe_,
12030 {
12031 'transform': 'translateY(100%)',
12032 'opacity': 1,
12033 'visibility': 'visible',
12034 },
12035 400,
12036 'ease-out'
12037 );
12038 });
12039 }
12040}
12041
12042/**

Callers 13

buildToast_Method · 0.95
writeFriendlyFrameFunction · 0.45
test-service.jsFile · 0.45
test-runtime.jsFile · 0.45
test-viewport.jsFile · 0.45
makeChildIframeDocWriteFunction · 0.45
test-dom-writer.jsFile · 0.45
test-response.jsFile · 0.45
startFunction · 0.45
test-detached.jsFile · 0.45
createFixtureIframeFunction · 0.45

Calls 5

animate_Method · 0.95
transition$1Function · 0.85
resolveMethod · 0.80
getWinMethod · 0.45
getBodyMethod · 0.45

Tested by

no test coverage detected