reflex-dom
reflex-dom copied to clipboard
WIP: Add Reflex.Dom.Event to expose addEventListener options
Some events like touchstart and touchmove behave differently (by default) on different browsers. However, changing the default settings in addEventHandler is not at all straightforward. This PR attempts to solve two problems:
- Make it easy to customize options for
addEventHandler. - Offer a version of
onfor DOM events that always normalizes the behavior between browers so there is no discrepancy.
The changes are added in a new Reflex.Dom.Event module. Bikeshed away. Many things in Immediate.hs should probably be moved to this module as well.
These changes could all go in ghcjs-dom and jsaddle-dom TBH except for the normalization bit.