I would like to add onmouseover to change background color of Button. I do not need to use a Html.Events.onMouseOver since it is a very simple task. I do not want to use other external libraries.
I create Html.attribute with
div
[
-- Html.Event.onMouserOver NoUse
Html.attribute "onmouseover" "$(this).css('background','green');"
]
[ ... ]
When I add unknown attributes to Elm. Elm addes "data-" prefix to the attributes Therefore, when I compile the code it will be translated to Html
<div data-onmouseover="$(this).css('background','green');">...</div>
So the "onmouseover" does not work!
How could I hack the "mouseover" event in Elm? and Why does Elm need to block such the event?