Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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...




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


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!




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: