I would like to use
HTMLInputElement.setCustomValidity(String) instead of using CSS.
Unfortunately elm/html does not have a DOM method primitive.
The problem with using
Html.Attributes.property "setCustomValidity" (JSON.Encode.string e), is that
Html.Attributes.property generates a
setter that not only is not working but overwrites
setCustomValidity() so it does not work for any JS on the page.
I’ve read Properties vs. Attributes that does not mention DOM methods and Exploits allowing arbitrary JS code execution via Elm code which indicate that all escape hatches has been closed.
Is there any simple way to call a DOM method on an Element in Elm?
PS. In case you want to see how I want to use
setCustomValidity, my attempt is on line 161 in celsiusToFahrenheit/src/Main.elm.