Open robx opened 5 years ago
Here's a relevant stackoverflow question: https://stackoverflow.com/questions/53456798/elm-attribute-onerror-adds-data-onerror-attribute-instead
For my specific use case, ports should work fine as shown in https://github.com/mpizenberg/elm-pointer-events/tree/4.0.0/examples/Pointer. I'll update the title to ask for this behaviour to be documented.
That only happens for fields that start with on
to prevent javascript injection.
https://github.com/elm/virtual-dom/blob/master/src/Elm/Kernel/VirtualDom.js#L282-L285
But it still would be good to mention it in the docs a bit more obviously.
My working elm 0.18 code
fails in 0.19 because it sets the
data-onpointerdown
attribute instead ofonpointerdown
.I suspect this is an intentional don't-let-me-shoot-myself-in-the-foot change, but in that case, it should be mentioned in the docs: https://package.elm-lang.org/packages/elm/html/latest/Html-Attributes#attribute