third_party/subscriptions-project/swg.js
/**
   * Builds the content of the iframe. On load, animates the toast.
   */
Builds the content of the iframe. On load, animates the toast.
Builds the content of the iframe . On load animates the toast .
buildToast_() {
    const toastDurationSeconds = 7;
    return this.activityPorts_
      .openIframe(this.iframe_, this.src_, this.args_)
      .then((port) => {
        return port.whenReady();
      })
      .then(() => {
        resetStyles(this.iframe_, ['height']);
        this.animate_(() => {
          setImportantStyles$1(this.iframe_, {
            'transform': 'translateY(100%)',
            'opactiy': 1,
            'visibility': 'visible',
          });
          return transition$1(
            this.iframe_,
            {
              'transform': 'translateY(0)',
              'opacity': 1,
              'visibility': 'visible',
            },
            400,
            'ease-out'
          );
        });
        this.doc_.getWin().setTimeout(() => {
          this.close();
        }, (toastDurationSeconds + 1) * 1000);
      });
  }
buildToast_ ( ) { const toastDurationSeconds = 7 ; return this . activityPorts_ . openIframe ( this . iframe_ , this . src_ , this . args_ ) . then ( ( port ) => { return port . whenReady ( ) ; } ) . then ( ( ) => { resetStyles ( this . iframe_ , [ 'height' ] ) ; this . animate_ ( ( ) => { setImportantStyles$1 ( this . iframe_ , { 'transform' : 'translateY(100%)' , 'opactiy' : 1 , 'visibility' : 'visible' , } ) ; return transition$1 ( this . iframe_ , { 'transform' : 'translateY(0)' , 'opacity' : 1 , 'visibility' : 'visible' , } , 400 , 'ease-out' ) ; } ) ; this . doc_ . getWin ( ) . setTimeout ( ( ) => { this . close ( ) ; } , ( toastDurationSeconds + 1 ) * 1000 ) ; } ) ; }
Builds the content of the iframe.
Builds the content of the iframe .
// Close the Toast after the specified duration.