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
Currently, Html.Events.on has the following type signature:
on:String->Decodermsg->Attributemsg
Several times, I've been struggling to find what I'm doing wrong, only to discover, that I've mistyped the event's name (stringly-typed ftw).
Wouldn't it be better, to replace that String argument with an enum, which has all current javascript events, plus a Custom String one, for custom events?
If you're up for such a change, I'm willing to implement it.
The text was updated successfully, but these errors were encountered:
Just to reiterate the note leohaskell made about custom events: if something like that were implemented, there would still need to be some way to listen to events with arbitrary string names:
Another solution to this problem would be to provide more functions like ‘onClick’, ‘onInput’, and the like, which is a viable option, as well, although it’s not as flexible as the above mentioned solution, because the user will have to stick with the provided specific implementations.
Currently, Html.Events.on has the following type signature:
Several times, I've been struggling to find what I'm doing wrong, only to discover, that I've mistyped the event's name (stringly-typed ftw).
Wouldn't it be better, to replace that
String
argument with an enum, which has all current javascript events, plus aCustom String
one, for custom events?If you're up for such a change, I'm willing to implement it.
The text was updated successfully, but these errors were encountered: