You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's come to my attention that the event names skin-tone-change and emoji-click may be problematic in some cases. It looks like some frameworks may not be able to use anything but lowercase, non-hyphenated event names, because that's what's supported in the DOM. E.g.:
<emoji-pickeronemojiclick></emoji-picker>
but not
<emoji-pickeronemoji-click></emoji-picker>
The second one looks like of bizarre anyway, so we should probably just support the non-hyphenated version, and maybe remove the hyphenated version in a major update later.
Note this would only apply to declarative usage not imperative usage. element.addEventListener() should work in all cases.
The text was updated successfully, but these errors were encountered:
Looking back through custom elements everywhere, it appears there are actually no tested frameworks that support lowercase events but not lowercase-kebab events.
Also, apparently onsomeevent is not a thing? file-drop adds some TypeScript annotations for JSX, but I assume this is just for Preact since React doesn't support any declarative events on custom elements whatsoever.
So maybe it is not a big deal to implement this.
nolanlawson
changed the title
Support events without hyphens
Support events without hyphens (?)
Aug 20, 2020
It's come to my attention that the event names
skin-tone-change
andemoji-click
may be problematic in some cases. It looks like some frameworks may not be able to use anything but lowercase, non-hyphenated event names, because that's what's supported in the DOM. E.g.:but not
The second one looks like of bizarre anyway, so we should probably just support the non-hyphenated version, and maybe remove the hyphenated version in a major update later.
Note this would only apply to declarative usage not imperative usage.
element.addEventListener()
should work in all cases.The text was updated successfully, but these errors were encountered: