I wish CSS selector based templating existed as a popular practice. Something like:
a#products { --text: name_of_my_variable; --attr-href: other_variable; }
ul { --list: iterate(my_list_variable); }
ul li { --text: item().name; }
I want something that allows my HTML template to be pure HTML. No template {vars}, no weird attributes, no language tags, etc. Just let me use plain HTML and target its DOM externally. XSLT can do that, but it feels like it wasn't meant to be written by humans.
5 comments
[ 2.8 ms ] story [ 25.6 ms ] threadYou can insert an image, a video, a SVG, or even an iframe from a URL, but you can't insert a <div>.
This would definitely be very nice to see -- but somehow I don't see browsers moving in that direction.
[0] https://pypi.org/project/xml-from-seq/