extensions/amp-ad/0.1/amp-ad-ui.js
/**
   * Apply UI for laid out ad with no-content
   * Order: try collapse -> apply provided fallback -> apply default fallback
   */
Apply UI for laid out ad with no-content
Order: try collapse -> apply provided fallback -> apply default fallback
Apply UI for laid out ad with no - content Order : try collapse - > apply provided fallback - > apply default fallback
applyNoContentUI() {
    if (getAdContainer(this.element_) == 'AMP-STICKY-AD') {
      this.baseInstance_.collapse();
      return;
    }
    this.baseInstance_.attemptCollapse().then(() => {}, () => {
      this.baseInstance_.deferMutate(() => {
        this.baseInstance_.togglePlaceholder(false);
        this.baseInstance_.toggleFallback(true);
      });
    });
  }
applyNoContentUI ( ) { if ( getAdContainer ( this . element_ ) == 'AMP-STICKY-AD' ) { this . baseInstance_ . collapse ( ) ; return ; } this . baseInstance_ . attemptCollapse ( ) . then ( ( ) => { } , ( ) => { this . baseInstance_ . deferMutate ( ( ) => { this . baseInstance_ . togglePlaceholder ( false ) ; this . baseInstance_ . toggleFallback ( true ) ; } ) ; } ) ; }
Apply UI for laid out ad with no-content
 Order: try collapse -> apply provided fallback -> apply default fallback
Apply UI for laid out ad with no - content Order : try collapse - > apply provided fallback - > apply default fallback
// Special case: force collapse sticky-ad if no content. /*OK*/ // The order here is collapse > user provided fallback > default fallback