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
{{ message }}
Repository navigation
Event name strings could be stored in constants #2670
When I create a new Event with the Element API addEventListener, I want to use a constant string from the framework so that I don't need to write "click" etc. myself.
If the event names were available in a centralized place, that would also help discoverability of events that I can use so I don't need to go check MDN or something.
We might want to take the same stance on this issue as with built-in tag names: We provide a list of constants in @Tag, but our own example code keeps using hardcoded strings, except that there's a notice in the primary tutorial about the functionality that also mentions the availability of those constants.
Activity
Legioth commentedon Oct 13, 2017
We might want to take the same stance on this issue as with built-in tag names: We provide a list of constants in
@Tag, but our own example code keeps using hardcoded strings, except that there's a notice in the primary tutorial about the functionality that also mentions the availability of those constants.totally-not-ai commentedon Dec 5, 2026
Closing as not planned: we don't plan to maintain a list of DOM event name constants.