Post a message containing the document height to the amp-iframe to trigger the resize.
554337
function postEmbedHeightToViewer() {
  var newHeight = document.getElementById('tabinterface').clientHeight;
  if (newHeight < MIN_IFRAME_HEIGHT) {
    console.log('embed height too small, reset height to 100px');
    newHeight = MIN_IFRAME_HEIGHT;
  }
  // Tell the viewer about the new size
  window.parent.postMessage({
    sentinel: 'amp',
    type: 'embed-size',
    height: newHeight
  }, '*');
}
582427
def resizeEvent(self, event):
        

        LOGGER.debug("> Application resize event accepted!")
        self.size_changed.emit(event)
        event.accept()
345998
function(self, domElement) {

    var width = domElement.videoWidth,
        height = domElement.videoHeight,
        stopped = true;

    function actor() {
      if (stopped) {
        return;
      }
      if (width !== domElement.videoWidth || height !== domElement.videoHeight) {
        self.trigger('videoDimensionsChanged',
          { width: width, height: height },
          { width: domElement.videoWidth, height: domElement.videoHeight }
        );
        width = domElement.videoWidth;
        height = domElement.videoHeight;
      }
      waiter();
    }

    function waiter() {
      self.whenTimeIncrements(function() {
        window.requestAnimationFrame(actor);
      });
    }

    self.startObservingSize = function() {
      stopped = false;
      waiter();
    };

    self.stopObservingSize = function() {
      stopped = true;
    };

  }
10775
function resize(url, type) {
  var img = new Image();
  display.innerHTML = '';
  img.onload= function () {
    var data = resizeImage.resize(img, 200, 100, type);
    var smallImg = new Image();
    display.appendChild(smallImg);
    smallImg.src = data;
  };
  display.appendChild(img);
  img.src = url;
}
556970
function (height, options) {
    if (numberIsInteger(height) && height < 1) {
      throw VideomailError.create('Passed limit-height argument cannot be less than 1!', options)
    } else {
      const limitedHeight = Math.min(
        height,
        // document.body.scrollHeight,
        document.documentElement.clientHeight
      )

      if (limitedHeight < 1) {
        throw VideomailError.create('Limited height cannot be less than 1!', options)
      } else {
        return limitedHeight
      }
    }
  }
110152
function sizeChange() {
      if (options.fixedSize) {
        adaptFontSize();
      } else {
        if (isUtimage) {
          adaptImageHeight();
        } else {
          adaptPostHeight();
        }
      }

      if (options.chars && mode && mode.editor === true) {
        updateCharactersCounter();
      }
    }
359942
def send_message(self, message, max_doc_size):
        
        if (self.max_bson_size is not None
                and max_doc_size > self.max_bson_size):
            raise DocumentTooLarge(
                "BSON document too large (%d bytes) - the connected server "
                "supports BSON document sizes up to %d bytes." %
                (max_doc_size, self.max_bson_size))

        try:
            self.sock.sendall(message)
        except BaseException as error:
            self._raise_connection_failure(error)
1361189
def resizeEvent(self, event):
        
        super(XTextEdit, self).resizeEvent(event)
        
        if self.autoResizeToContents():
            self.resizeToContents()
1068231
function resizeListener(e) {
    var win = e.target || e.srcElement;
    // Get resize funciton to be triggered and suscribe itto cancel function
    if (win.__resizeRAF) cancelFrame(win.__resizeRAF);
    // Declare resize function and suscribe it to request animation frame functionality
    win.__resizeRAF = requestFrame(function() {
      var trigger = win.__resizeTrigger;
      // Call every monitored element resize callbacks
      if (trigger) {
        // Call every monitored element resize callbacks
        for (var key in trigger.__resizeListeners) {
          trigger.__resizeListeners[key].call(trigger, e);
        }
      }
    });
  }
197021
def resizeToContents(self):
        
        doc = self.document()
        h = doc.documentLayout().documentSize().height()
        self.setFixedHeight(h + 4)
447514
private void resizeValueText() {
        double maxWidth = size * 0.86466165;
        double fontSize = size * 0.2556391;
        valueText.setFont(Fonts.latoLight(fontSize));
        if (valueText.getLayoutBounds().getWidth() > maxWidth) { Helper.adjustTextSize(valueText, maxWidth, fontSize); }
        valueText.relocate((size - valueText.getLayoutBounds().getWidth()) * 0.5, (size - valueText.getLayoutBounds().getHeight()) * 0.5);
    }
749843
def resizeEvent(self, event):
        
        super(XPushButton, self).resizeEvent(event)
        
        if self._richTextLabel:
            self._richTextLabel.resize(event.size())
192637
function() {

            var oDoc, 
                oIFrame, 
                sHTML;

            function fireTextResize() {
                Module.textResizeEvent.fire();
            }

            if (!UA.opera) {
                oIFrame = Dom.get("_yuiResizeMonitor");

                var supportsCWResize = this._supportsCWResize();

                if (!oIFrame) {
                    oIFrame = document.createElement("iframe");

                    if (this.isSecure && Module.RESIZE_MONITOR_SECURE_URL && UA.ie) {
                        oIFrame.src = Module.RESIZE_MONITOR_SECURE_URL;
                    }

                    if (!supportsCWResize) {
                        // Can't monitor on contentWindow, so fire from inside iframe
                        sHTML = ["<html><head><script ",
                                 "type=\"text/javascript\">",
                                 "window.onresize=function(){window.parent.",
                                 "YAHOO.widget.Module.textResizeEvent.",
                                 "fire();};<",
                                 "\/script></head>",
                                 "<body></body></html>"].join('');

                        oIFrame.src = "data:text/html;charset=utf-8," + encodeURIComponent(sHTML);
                    }

                    oIFrame.id = "_yuiResizeMonitor";
                    oIFrame.title = "Text Resize Monitor";
                    /*
                        Need to set "position" property before inserting the 
                        iframe into the document or Safari's status bar will 
                        forever indicate the iframe is loading 
                        (See YUILibrary bug #1723064)
                    */
                    oIFrame.style.position = "absolute";
                    oIFrame.style.visibility = "hidden";

                    var db = document.body,
                        fc = db.firstChild;
                    if (fc) {
                        db.insertBefore(oIFrame, fc);
                    } else {
                        db.appendChild(oIFrame);
                    }

                    // Setting the background color fixes an issue with IE6/IE7, where
                    // elements in the DOM, with -ve margin-top which positioned them 
                    // offscreen (so they would be overlapped by the iframe and its -ve top
                    // setting), would have their -ve margin-top ignored, when the iframe 
                    // was added.
                    oIFrame.style.backgroundColor = "transparent";

                    oIFrame.style.borderWidth = "0";
                    oIFrame.style.width = "2em";
                    oIFrame.style.height = "2em";
                    oIFrame.style.left = "0";
                    oIFrame.style.top = (-1 * (oIFrame.offsetHeight + Module.RESIZE_MONITOR_BUFFER)) + "px";
                    oIFrame.style.visibility = "visible";

                    /*
                       Don't open/close the document for Gecko like we used to, since it
                       leads to duplicate cookies. (See YUILibrary bug #1721755)
                    */
                    if (UA.webkit) {
                        oDoc = oIFrame.contentWindow.document;
                        oDoc.open();
                        oDoc.close();
                    }
                }

                if (oIFrame && oIFrame.contentWindow) {
                    Module.textResizeEvent.subscribe(this.onDomResize, this, true);

                    if (!Module.textResizeInitialized) {
                        if (supportsCWResize) {
                            if (!Event.on(oIFrame.contentWindow, "resize", fireTextResize)) {
                                /*
                                     This will fail in IE if document.domain has 
                                     changed, so we must change the listener to 
                                     use the oIFrame element instead
                                */
                                Event.on(oIFrame, "resize", fireTextResize);
                            }
                        }
                        Module.textResizeInitialized = true;
                    }
                    this.resizeMonitor = oIFrame;
                }
            }
        }
81404
function( width, height ) {
		if( width !== this.width || height !== this.height ) {
			this.width = width;
			this.height = height;
			this._contentElement.outerWidth( width )
			     .outerHeight( height );
			this.emit( 'resize' );
		}
	}
156031
@NonNull
  public RequestCreator resizeDimen(int targetWidthResId, int targetHeightResId) {
    Resources resources = picasso.context.getResources();
    int targetWidth = resources.getDimensionPixelSize(targetWidthResId);
    int targetHeight = resources.getDimensionPixelSize(targetHeightResId);
    return resize(targetWidth, targetHeight);
  }
122364
private String getResizeJavaScript() {				
		StringBuilder sb = new StringBuilder();
		sb.append("$(window).bind(\'resizeEnd\',function(){");
		sb.append(getNextChartJavascriptCall());
		sb.append("});");
		return sb.toString();
	}
1008610
function(el, value) {
	        if (el.holderData) {
	            el.holderData.resizeUpdate = !!value;
	            if (el.holderData.resizeUpdate) {
	                updateResizableElements(el);
	            }
	        }
	    }