Skip to content

Custom Element, Emit CustomEvent, allow bubbles #7605

Closed
@NielsJorck

Description

@NielsJorck

What problem does this feature solve?

The current implementation of Custom Elements lets defined emits dispatch a CustomEvent with the arg put in details.
However there is no way to allow these events to bubble.

Current code snippet from the sourcecode:

new CustomEvent(event, {
  detail: args
})

As described in the documentation here: https://vuejs.org/guide/extras/web-components.html#events

However there is no way to define the bubbles property in the CustomEvent.

What does the proposed API look like?

It could be as simple as checking if there is a property called bubbles in the args and pass that in, otherwise default to false.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions