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

Consider supporting mixed case events. #44

Closed
robdodson opened this Issue Dec 21, 2017 · 1 comment

Comments

2 participants
@robdodson

robdodson commented Dec 21, 2017

I wanted to open this issue so folks using DIO know about it. There are a few similar bugs in other libraries.

DIO can listen to native DOM events dispatched from Custom Elements. However, it uses a heuristic to convert JSX event binding syntax into event names, and always lowercases the events. For example onFooUpdated={handleFoo} tells DIO to listen for an event called 'fooupdated'. This means DIO can support events with lowercase and kebab-case names, but not camelCase, PascalCase, or CAPScase events (e.g. 'URLchanged').
From https://custom-elements-everywhere.com/#dio-handling-events

Preact tracking bug - developit/preact#788
Polymer tracking bug - Polymer/polymer#4888
Stencil tracking bug - ionic-team/stencil#373

Feel free to close if you don't think this is an actual issue or you don't intend to work on it. The main objective of my tests is just to outline what will and won't work so developers can figure out best practices.

@thysultan

This comment has been minimized.

Show comment
Hide comment
@thysultan

thysultan Apr 10, 2018

Owner

Thanks, even though the default DOM renderer doesn't support this, this was one of the considerations i had with the move to allow more control over the heuristics involved in the props namespace so that a custom renderer would be able to implement and support this if it wanted to.

Owner

thysultan commented Apr 10, 2018

Thanks, even though the default DOM renderer doesn't support this, this was one of the considerations i had with the move to allow more control over the heuristics involved in the props namespace so that a custom renderer would be able to implement and support this if it wanted to.

@thysultan thysultan closed this Apr 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment