Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feature) EventTarget API on host elements #37

Open
necolas opened this issue Feb 26, 2024 · 0 comments
Open

(feature) EventTarget API on host elements #37

necolas opened this issue Feb 26, 2024 · 0 comments
Labels
feature Feature or technical request

Comments

@necolas
Copy link
Contributor

necolas commented Feb 26, 2024

Describe the feature request

The EventTarget interface is implemented by objects that can receive events and may have listeners for them. Native does not currently support this API on host elements.

Previously we had introduced a prototype implementation of addEventListener and removeEventListener in React Native, but it was removed as it needs to be reimplemented properly and integrated with broader changes to React Native. For example, the events need to conform to W3C standards in terms of timing and event payload.

In the meantime, we may be able to polyfill this API using event emitters and the new traversal APIs, which would allow us to emulate capture/bubble phases of events. But, ideally we'd build this into React Native given it would be more performant and there is already an existing event system.

@necolas necolas added the feature Feature or technical request label Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature or technical request
Projects
None yet
Development

No branches or pull requests

1 participant