valderman / haste-compiler

A GHC-based Haskell to JavaScript compiler
http://haste-lang.org
BSD 3-Clause "New" or "Revised" License
1.45k stars 109 forks source link

MouseData has no target element #371

Open wilfriedvanasten opened 8 years ago

wilfriedvanasten commented 8 years ago

The current MouseData record has no target element. This is problematic, since I use a common click handler for several elements retrieved using a query selector and have a data attribute set on the elements which contains the additional information necessary to make the click handler work. I can retrieve this from the target element. I really prefer this approach since it works regardless of how my template is structured and I can keep my lower templates clean of actual event handling logic.