extensions/amp-story-share-menu/0.1/amp-story-share-menu.js
/**
   * Builds and appends the component in the story. Could build either the
   * amp-social-share button to display the native system sharing, or a fallback
   * UI.
   * @return {!Promise}
   */
Builds and appends the component in the story. Could build either the
amp-social-share button to display the native system sharing, or a fallback
UI.
@return {!Promise}
Builds and appends the component in the story . Could build either the amp - social - share button to display the native system sharing or a fallback UI . @return { !Promise }
buildCallback() {
    if (this.rootEl_) {
      return;
    }
    return Promise.all([
      Services.storyStoreServiceForOrNull(this.win).then(
        (service) => (this.storeService_ = service)
      ),
      Services.localizationServiceForOrNull(this.element).then(
        (service) => (this.localizationService_ = service)
      ),
    ]).then(() => {
      const providersList = this.buildProvidersList_();
      this.rootEl_ = this.buildDialog_(providersList);
      createShadowRootWithStyle(this.element, this.rootEl_, CSS);
      this.initializeListeners_();
    });
  }
buildCallback ( ) { if ( this . rootEl_ ) { return ; } return Promise . all ( [ Services . storyStoreServiceForOrNull ( this . win ) . then ( ( service ) => ( this . storeService_ = service ) ) , Services . localizationServiceForOrNull ( this . element ) . then ( ( service ) => ( this . localizationService_ = service ) ) , ] ) . then ( ( ) => { const providersList = this . buildProvidersList_ ( ) ; this . rootEl_ = this . buildDialog_ ( providersList ) ; createShadowRootWithStyle ( this . element , this . rootEl_ , CSS ) ; this . initializeListeners_ ( ) ; } ) ; }
Builds and appends the component in the story.
Builds and appends the component in the story .