Skip to content

bubbles config not applied to dispatchEvent() #585

@simontaisne

Description

@simontaisne

The bubbles configuration in remoteEvents is not automatically applied to events returned by dispatchEvent() functions. This forces developers to manually duplicate the bubbles configuration in each event constructor call.

Current behavior

static get remoteEvents() {
  return {
    click: {
      bubbles: true,  // This configuration is ignored
      dispatchEvent() {
        return new Event('click', {bubbles: true}); // Manual duplication required
      },
    },
  };
}

Expected behavior

The remote-dom framework should:

  1. Read the bubbles configuration from the event definition in remoteEvents
  2. Automatically apply it to any event returned by dispatchEvent()
  3. Override any bubbles setting in the returned event with the configured value
static get remoteEvents() {
  return {
    click: {
      bubbles: true,  // This should be automatically applied
      dispatchEvent() {
        return new Event('click'); // No manual bubbles specification needed
      },
    },
  };
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions