third_party/subscriptions-project/swg.js
/**
   * Build the iframe with the styling after iframe is loaded.
   * @private
   */
Build the iframe with the styling after iframe is loaded.
@private
Build the iframe with the styling after iframe is loaded . @private
buildIframe_() {
    const iframe = this.iframe_;
    const iframeBody = iframe.getBody();
    const iframeDoc =  (this.iframe_.getDocument());
    injectStyleSheet(resolveDoc(iframeDoc), CSS$1);
    const loadingViewClasses = [];
    if (this.isPositionCenterOnDesktop()) {
      loadingViewClasses.push('centered-on-desktop');
    }
    this.loadingView_ = new LoadingView(iframeDoc, {
      additionalClasses: loadingViewClasses,
    });
    iframeBody.appendChild(this.loadingView_.getElement());
    this.container_ = createElement(iframeDoc, 'swg-container', {});
    iframeBody.appendChild(this.container_);
    this.setPosition_();
    if (this.positionCenterOnDesktop_) {
      this.desktopMediaQueryListener_ = () => {
        this.setPosition_();
      };
      this.desktopMediaQuery_.addListener(this.desktopMediaQueryListener_);
    }
  }
buildIframe_ ( ) { const iframe = this . iframe_ ; const iframeBody = iframe . getBody ( ) ; const iframeDoc = ( this . iframe_ . getDocument ( ) ) ; injectStyleSheet ( resolveDoc ( iframeDoc ) , CSS$1 ) ; const loadingViewClasses = [ ] ; if ( this . isPositionCenterOnDesktop ( ) ) { loadingViewClasses . push ( 'centered-on-desktop' ) ; } this . loadingView_ = new LoadingView ( iframeDoc , { additionalClasses : loadingViewClasses , } ) ; iframeBody . appendChild ( this . loadingView_ . getElement ( ) ) ; this . container_ = createElement ( iframeDoc , 'swg-container' , { } ) ; iframeBody . appendChild ( this . container_ ) ; this . setPosition_ ( ) ; if ( this . positionCenterOnDesktop_ ) { this . desktopMediaQueryListener_ = ( ) => { this . setPosition_ ( ) ; } ; this . desktopMediaQuery_ . addListener ( this . desktopMediaQueryListener_ ) ; } }
Build the iframe with the styling after iframe is loaded.
Build the iframe with the styling after iframe is loaded .
/** @type {!HTMLDocument} */ // Inject Google fonts in <HEAD> section of the iframe. // Add Loading indicator. // Container for all dynamic content, including 3P iframe. // Add listener to adjust position when crossing a media query breakpoint.