solenya-group / solenya

mega-powerful micro-framework
MIT License
81 stars 0 forks source link

Add Typing for Element DOM Events #4

Closed solenya-group closed 5 years ago

solenya-group commented 6 years ago

These are already there for lifecycle events, but it would be nice if these were added for native DOM events too. This would avoid getting the wrong name (e.g. leaving out "on") as well as not needing to specify the type of the event argument. E.g like this:

div ({onclick: e => {}}

Ideally they'd be specific to each element (as some events only apply to some elements). That might actually be a requirement, in the case that different elements re-use the same event names but with differently typed event arguments.

solenya-group commented 5 years ago

done