Conversation
|
I had considered this too, but an alternative way: give I've not decided whether it's "too opinionated" to do so yet... |
|
It would be nice to have what I've already commited and a phantom type variable to addEventListener :: forall eff ev. EventType ev -> EventListener ev (dom :: DOM | eff) -> Boolean -> EventTarget -> Eff (dom :: DOM | eff) Unit |
|
Hmm. Looking at the table here Given that I think we'd have to leave |
|
As for having |
|
(see also #23 for a workaround) |
|
@sharkdp Oh, thanks for that reference. I should have checked existing issues :( |
|
I don't think you need a class to express it, we'd just put the appropriate I'll mock something up this weekend perhaps. |
Since we provide types for various events (e.g.
MessageEvent) it makes sense to have some way of using them in listeners.Not quite sure, perhaps there is a better solution.