open-wc / custom-elements-manifest-deprecated

Custom Elements Manifest is a file format that describes custom elements in your project.
8 stars 4 forks source link

events end up in manifest multiple times #42

Closed thepassle closed 3 years ago

thepassle commented 3 years ago

when adding an event, check if it doesnt already exist

  __open(dispatch) {
    if (dispatch) {
      this.dispatchEvent(
        new CustomEvent('opened-changed', {
          detail: true,
        }),
      );
    }
    this.__button.setAttribute('aria-expanded', 'true');
  }

  __close() {
    this.dispatchEvent(
      new CustomEvent('opened-changed', {
        detail: false,
      }),
    );
    this.__button.setAttribute('aria-expanded', 'false');
  }
{
  "name": "opened-changed",
  "type": {
    "type": "CustomEvent"
  }
},
{
  "name": "opened-changed",
  "type": {
    "type": "CustomEvent"
  }
}