elm-html icon indicating copy to clipboard operation
elm-html copied to clipboard

Html.Attributes.value docs should mention textarea

Open iancanderson opened this issue 10 years ago • 2 comments

I was mislead by the docs for the Html.Attributes.value function, since it didn't mention that it worked with textarea. I was instead trying to bind the contents of the textarea to the underlying model by setting the value of an inner text node.

Thanks for elm! It's been really great so far!

iancanderson avatar Feb 12 '16 21:02 iancanderson

Thanks :)

I am trying to find some docs that say all the things the .value property works on. I found this, but it does not list all DOM nodes that have a value field. Can you try to find some documentation for this case? And ideally find a list that says "tags A, B, C, etc. all have a value property that is a string"?

evancz avatar Feb 12 '16 22:02 evancz

Sorry, I couldn't find a canonical list of DOM elements with the .value property in a single place.

However, a mozilla page describes the property for each of the relevant HTMLElement subclasses, if that helps: https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement https://developer.mozilla.org/en-US/docs/Web/API/HTMLLIElement https://developer.mozilla.org/en-US/docs/Web/API/HTMLParamElement https://developer.mozilla.org/en-US/docs/Web/API/HTMLProgressElement (though its a double value) https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement

I also noticed that the meter element didn't seem to have value defined: https://developer.mozilla.org/en-US/docs/Web/API/HTMLMeterElement

iancanderson avatar Feb 14 '16 02:02 iancanderson