purescript-deprecated/purescript-dom

Add event types

Closed this issue · 2 comments

Events are part of the DOM, so shouldn't we define foreign types for them in this library instead of, for instance, as new foreign types in thermite? It'd be a shame for every event handling library to need to define their own, incompatible foreign types for the same underlying events.

I started to give this a go tonight and discovered there is no obvious un-opinionated way to represent the event types due to significant inheritance. Discovered that this has come up before in the purescript simple dom library (see issue 3). I'm going to go ahead and close this.

FYI I am getting a start on trying out common event types here. I'm fine with rolling them over into purescript-dom if it seems like they will have a place here. Otherwise I'll keep doing my own thing.