Lurker News

Comments (242) 68 threads

Earlier comments
lelandfe2 replies#


    <iframe hidden name=htmz onload="..
</code></pre>
I'm somewhat frightened to ask if there's some special voodoo need for leaving off the quotes on htmz...
wild_egg#
Quotes are completely optional on attribute values in HTML5 if the value doesn't have certain characters like spaces which will require quoting

I've found this article a handy reference on all the stuff it's safe to leave out
https://meiert.com/en/blog/optional-html/

Kalabasa1 reply#
Nah it's a stylistic thing. It's so that you can see the `=htmz>` logo in code if you order the target attribute last :D
arispen#
:O
naasking#
Very neat use of existing HTML. One thing this highlighted for me is that the MDN docs on the target attribute are incomplete, because I was recently reading them and while they mention that you can target iframes, they didn't actually describe how to do so.

I was reading the docs because I had some thoughts on my own htmx-like take. You've used some of the same attributes I was going to use but slightly differently than how I was going to approach it. Some good food for thought!

buremba1 reply#
I wonder how feasible it is to create htmz / htmx -like lightweight library with the support for React/Vue/Stelve using web components. I agree that 90% of the use-cases you don’t need React but for the last 10%, most of us are stuck with these bloated frameworks. Astro has a similar idea but it’s working as a full framework instead of being a library. Considering the limitations with Astro, I guess the biggest bottleneck is state management.
d0utone#
Refreshed 10 times to see the neat animation on top again!

Load more comments