On 2014-09-28 11:46 AM, Patrick Walton wrote:
On 9/28/14 8:12 AM, Josh Matthews wrote:
I started trying to implement really basic form controls, and I've
become stuck on my under-developed layout knowledge. HTMLInputElement is
special, because it has no DOM children and instead needs to perform
layout based on its value attribute (which contains the current text).
This seems similar to generated content from pseudo-elements, but I
can't see a good way to reuse that code for this purpose (I guess it's
done by iterating over fake children so flows are created). What's the
best way to go about this?
I figured that if we were going the Web Components-ish route for form
controls then the component logic (written in JavaScript) would just
extract the value of the "value" attribute and copy it to a text node
under the input element.
Patrick
Right, but that's predicated on the existence of Web Components which is
going to be a gigantic project in all likelihood. I'm just seeing how
useful some small form control code written in Rust ends up being, but
I'm stuck on the layout bits.
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo