extensions/amp-carousel/0.1/slidescroll.js
/**
   * Shows the slide at the given index and triggers a `slideChange` event.
   * @param {number} newIndex
   * @private
   */
Shows the slide at the given index and triggers a `slideChange` event.
@param {number} newIndex
@private
Shows the slide at the given index and triggers a ` slideChange ` event . @param { number } newIndex @private
showSlideAndTriggerAction_(newIndex) {
    const slideChanged = this.showSlide_(newIndex);
    if (slideChanged) {
      const name = 'slideChange';
      const event =
          createCustomEvent(this.win, `slidescroll.${name}`, {index: newIndex});
      this.action_.trigger(this.element, name, event, ActionTrust.HIGH);
      this.element.dispatchCustomEvent(name, {index: newIndex});
    }
  }
showSlideAndTriggerAction_ ( newIndex ) { const slideChanged = this . showSlide_ ( newIndex ) ; if ( slideChanged ) { const name = 'slideChange' ; const event = createCustomEvent ( this . win , ` ${ name } ` , { index : newIndex } ) ; this . action_ . trigger ( this . element , name , event , ActionTrust . HIGH ) ; this . element . dispatchCustomEvent ( name , { index : newIndex } ) ; } }
Shows the slide at the given index and triggers a `slideChange` event.
Shows the slide at the given index and triggers a ` slideChange ` event .