extensions/amp-list/0.1/amp-list.js
/**
   * Attempts to change the height of the amp-list to fit a target child.
   *
   * If the target's height is greater than the amp-list's height, attempt
   * to change the amp-list's height to fit the target.
   *
   * @param {!Element} target
   * @private
   */
Attempts to change the height of the amp-list to fit a target child.
If the target's height is greater than the amp-list's height, attempt
to change the amp-list's height to fit the target.

@param {!Element} target
@private
Attempts to change the height of the amp - list to fit a target child . If the target ' s height is greater than the amp - list ' s height attempt to change the amp - list ' s height to fit the target . @param { !Element } target @private
attemptToFit_(target) {
    this.measureElement(() => {
      const scrollHeight = target.scrollHeight;
      const height = this.element.offsetHeight;
      if (scrollHeight > height) {
        this.attemptChangeHeight(scrollHeight).catch(() => {});
      } else if (scrollHeight == height
          && this.hasResizableChildren_) {
        this.changeToLayoutContainer_();
      }
    });
  }
attemptToFit_ ( target ) { this . measureElement ( ( ) => { const scrollHeight = target . scrollHeight ; const height = this . element . offsetHeight ; if ( scrollHeight > height ) { this . attemptChangeHeight ( scrollHeight ) . catch ( ( ) => { } ) ; } else if ( scrollHeight == height && this . hasResizableChildren_ ) { this . changeToLayoutContainer_ ( ) ; } } ) ; }
Attempts to change the height of the amp-list to fit a target child.
Attempts to change the height of the amp - list to fit a target child .
/*OK*/ /*OK*/