Skip to content

Handler gets attached twice if name already exists in DOM #26

@ChristophP

Description

@ChristophP

If you have a react property called onClick and use it on the web-react-component the handler will fire twice. Once for the native DOM and once for the web react component.

Example (logs twice when clicked):

<some-button onClick="console.log('Hello')"></some-button>

This is not an issue when attaching the handler with addEventListener though, because the DOM event would be click while the web react component event would be onClick

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions