onClick() {
    const event = new CustomEvent("buttonClicked", {
      detail: {
        button: this.buttonId
      },
      bubbles: true
    });
    this.dispatchEvent(event);
    this.buttonFunction();
  }
/**
   * Method to emit event with button's id in e.detail.button when the button is clicked
   */
Method to emit event with button's id in e.detail.button when the button is clicked
Method to emit event with button ' s id in e . detail . button when the button is clicked
onClick() {
    const event = new CustomEvent("buttonClicked", {
      detail: {
        button: this.buttonId
      },
      bubbles: true
    });
    this.dispatchEvent(event);
    this.buttonFunction();
  }
onClick ( ) { const event = new CustomEvent ( "buttonClicked" , { detail : { button : this . buttonId } , bubbles : true } ) ; this . dispatchEvent ( event ) ; this . buttonFunction ( ) ; }
Method to emit event with button's id in e.detail.button when the button is clicked
Method to emit event with button ' s id in e . detail . button when the button is clicked