extensions/amp-story-interactive/0.1/amp-story-interactive-abstract.js
/**
   * Updates the selected classes on component and option selected.
   * @param {?Element} selectedOption
   * @protected
   */
Updates the selected classes on component and option selected.
@param {?Element} selectedOption
@protected
Updates the selected classes on component and option selected . @param { ?Element } selectedOption @protected
updateToPostSelectionState_(selectedOption) {
    this.rootEl_.classList.add(POST_SELECTION_CLASS);
    if (selectedOption != null) {
      selectedOption.classList.add(
        'i-amphtml-story-interactive-option-selected'
      );
    }
    if (this.optionsData_) {
      this.rootEl_.classList.add('i-amphtml-story-interactive-has-data');
      this.displayOptionsData(this.optionsData_);
    }
    this.getOptionElements().forEach((el) => {
      el.setAttribute('tabindex', -1);
    });
  }
updateToPostSelectionState_ ( selectedOption ) { this . rootEl_ . classList . add ( POST_SELECTION_CLASS ) ; if ( selectedOption != null ) { selectedOption . classList . add ( 'i-amphtml-story-interactive-option-selected' ) ; } if ( this . optionsData_ ) { this . rootEl_ . classList . add ( 'i-amphtml-story-interactive-has-data' ) ; this . displayOptionsData ( this . optionsData_ ) ; } this . getOptionElements ( ) . forEach ( ( el ) => { el . setAttribute ( 'tabindex' , - 1 ) ; } ) ; }
Updates the selected classes on component and option selected.
Updates the selected classes on component and option selected .