Re:I'm Betting on HTML
by zelphirkalt on Wednesday August 02, 2023 @08:14AM
(#36969800)
I think you misunderstand what I mean by "compose".
You can compose most HTML elements including <select> easily:
<label>
What do you like?
<select name="choice">
<option value="first">First Value</option>
<option value="second" selected>Second Value</option>
<option value="third">Third Value</option>
</select>
</label>
There you go, you did composition. The logic between those elements, how doing something with one element affects the other element, that is a different matter.For some elements it might be invalid HTML if one is inside the other. Like a <div> inside a <span> or so.
If you want to do another common thing like allow selecting multiple items, this is also impossible. It's not worth starting with the HTML one and then extending later because there is no path to do this. You have to totally scrap the HTML version so you may as well start with a JS library that does everything you need today and everything you will need tomorrow. Which you can theme to fit in with the rest of the app rather than looking like a pimple on a pumpkin that UX and end users spot and complain about instantly.