extensions/amp-story/1.0/amp-story.js
/**
   * Checks for the presence of a sidebar. If a sidebar does exist, then an icon
   * permitting for the opening/closing of the sidebar is shown.
   * @private
   */
Checks for the presence of a sidebar. If a sidebar does exist, then an icon
permitting for the opening/closing of the sidebar is shown.
@private
Checks for the presence of a sidebar . If a sidebar does exist then an icon permitting for the opening / closing of the sidebar is shown . @private
initializeSidebar_() {
    this.sidebar_ = this.element.querySelector('amp-sidebar');
    if (!this.sidebar_) {
      return;
    }
    this.storeService_.dispatch(Action.TOGGLE_HAS_SIDEBAR,
        !!this.sidebar_);
    const actions = [
      {tagOrTarget: 'AMP-SIDEBAR', method: 'open'},
      {tagOrTarget: 'AMP-SIDEBAR', method: 'close'},
      {tagOrTarget: 'AMP-SIDEBAR', method: 'toggle'},
    ];
    this.storeService_.dispatch(Action.ADD_TO_ACTIONS_WHITELIST, actions);
  }
initializeSidebar_ ( ) { this . sidebar_ = this . element . querySelector ( 'amp-sidebar' ) ; if ( ! this . sidebar_ ) { return ; } this . storeService_ . dispatch ( Action . TOGGLE_HAS_SIDEBAR , ! ! this . sidebar_ ) ; const actions = [ { tagOrTarget : 'AMP-SIDEBAR' , method : 'open' } , { tagOrTarget : 'AMP-SIDEBAR' , method : 'close' } , { tagOrTarget : 'AMP-SIDEBAR' , method : 'toggle' } , ] ; this . storeService_ . dispatch ( Action . ADD_TO_ACTIONS_WHITELIST , actions ) ; }
Checks for the presence of a sidebar.
Checks for the presence of a sidebar .