Live data from Hacker News

Show HN: htmz – a low power tool for HTML

leanrada.com

11–20 of 256 posts

Re: Show HN: htmz – a low power tool for HTML

#11
post #6

At what point does it cease to be a framework and become just a regular line of code?

From the FAQ: > * Is htmz a library or a framework? > htmz is a snippet.

From the README:

> htmz is a minimalist HTML microframework

So, some ambiguity.

Re: Show HN: htmz – a low power tool for HTML

#12
post #9

Given that this uses `target`, doesn't it mean that unlike htmx you can't easily make this gracefully degrade when JS isn't enabled? And, yes, I know, saying "when JS isn't enabled" in 2024 is a bit like saying "when the user is on Mars and has a 10 minute RTT" but forgive me for being an idealist.

I use Disable JavaScript extension with js disabled by default and only enable it if website is broken.

https://addons.mozilla.org/en-US/firefox/addon/disable-javas...

Re: Show HN: htmz – a low power tool for HTML

#15
That's a great hack and it shows how close the browser is to offering SPA natively.

Just a few attributes and we could avoid the iframe.

It's probably more useful to prove a point than an actual day to day tool. And the point seems to be: htmx is too much trouble for what it offers. We just need HTML native ajax.

Re: Show HN: htmz – a low power tool for HTML

#16
post #10

Apparently it breaks your back button too.

If you're talking about the tabs demo, I think it's reasonable for some use cases to respect back button as previous tab. as long as it's easy to opt out.

The inline editing demo also has a separate URL for the "we're editing" state

Re: Show HN: htmz – a low power tool for HTML

#17
post #9

Given that this uses `target`, doesn't it mean that unlike htmx you can't easily make this gracefully degrade when JS isn't enabled? And, yes, I know, saying "when JS isn't enabled" in 2024 is a bit like saying "when the user is on Mars and has a 10 minute RTT" but forgive me for being an idealist.

[deleted]

Re: Show HN: htmz – a low power tool for HTML

#18
post #9

Given that this uses `target`, doesn't it mean that unlike htmx you can't easily make this gracefully degrade when JS isn't enabled? And, yes, I know, saying "when JS isn't enabled" in 2024 is a bit like saying "when the user is on Mars and has a 10 minute RTT" but forgive me for being an idealist.

I use Disable JavaScript extension with js disabled by default and only enable it if website is broken. https://addons.mozilla.org/en-US/firefox/addon/disable-javas...

You should use uMatrix so you can only enable the scripts necessary to unbreak the site

Re: Show HN: htmz – a low power tool for HTML

#19
post #9

Given that this uses `target`, doesn't it mean that unlike htmx you can't easily make this gracefully degrade when JS isn't enabled? And, yes, I know, saying "when JS isn't enabled" in 2024 is a bit like saying "when the user is on Mars and has a 10 minute RTT" but forgive me for being an idealist.

Yeah it breaks without JS. You could add the iframe behind JS, so the target would default to a new tab. But the server would still be designed to return HTML fragments. I never found a way for a server to check if the originating request is for an iframe or a new tab. It's not quite a graceful degradation.
Post reply on HN