News for hackers. Stuff that matters.
Re:Htmx 2.0.0 has been released by logankeenan on Monday June 17, 2024 @05:49PM (#40711466)
Have you considered replacing xhr with fetch? I believe it would allow htmx to be used in even more places. Fetch can be hijacked so returning data to the htmx framework isn't limited to the network. You could "run" a server in the browser or have a native app render HTML as well.

Perhaps, there's already a good way to hijack xhr that I'm unaware of too.

Edit: Relevant link: https://logankeenan.com/posts/client-side-server-with-rust-a...

Re:Htmx 2.0.0 has been released by recursivedoubts on Monday June 17, 2024 @06:02PM (#40711592)
yeah, looked at it, unfortunately fetch() and xhr have a non-intersecting set of features (in particular, upload progress for xhr) so we decided not to touch it

i may restructure the internals to allow for mocking out responses using events, it comes up, especially w/ extensions

Re:Htmx 2.0.0 has been released by logankeenan on Monday June 17, 2024 @06:07PM (#40711645)
That'd be great, and I'd love to help in any way I can! Feel free to @mention me on Github. https://github.com/logankeenan

Thanks for making htmx!