extensions/amp-ad/0.1/amp-ad-xorigin-iframe-handler.js
/**
   * Updates the element's dimensions to accommodate the iframe's
   * requested dimensions. Notifies the window that request the resize
   * of success or failure.
   * @param {number|string|undefined} height
   * @param {number|string|undefined} width
   * @param {!Window} source
   * @param {string} origin
   * @private
   */
Updates the element's dimensions to accommodate the iframe's
requested dimensions. Notifies the window that request the resize
of success or failure.
Updates the element ' s dimensions to accommodate the iframe ' s requested dimensions . Notifies the window that request the resize of success or failure .
handleResize_(height, width, source, origin) {
    this.baseInstance_.getVsync().mutate(() => {
      if (!this.iframe) {
        return;
      }
      const iframeHeight = this.iframe.offsetHeight;
      const iframeWidth = this.iframe.offsetWidth;
      this.uiHandler_.updateSize(height, width, iframeHeight,
          iframeWidth).then(info => {
            this.sendEmbedSizeResponse_(info.success,
                info.newWidth, info.newHeight, source, origin);
          }, () => {});
    });
  }
handleResize_ ( height , width , source , origin ) { this . baseInstance_ . getVsync ( ) . mutate ( ( ) => { if ( ! this . iframe ) { return ; } const iframeHeight = this . iframe . offsetHeight ; const iframeWidth = this . iframe . offsetWidth ; this . uiHandler_ . updateSize ( height , width , iframeHeight , iframeWidth ) . then ( info => { this . sendEmbedSizeResponse_ ( info . success , info . newWidth , info . newHeight , source , origin ) ; } , ( ) => { } ) ; } ) ; }
Updates the element's dimensions to accommodate the iframe's
 requested dimensions.
Updates the element ' s dimensions to accommodate the iframe ' s requested dimensions .
// iframe can be cleanup before vsync. /*OK*/ /*OK*/