10 ms·
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
by logankeenan 2y ago
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-new-approach-to-ui-development/ https://logankeenan.com/posts/client-side-server-with-rust-a...
- recursivedoubts 2y agoyeah, 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
- logankeenan 2y agoThat'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 https://github.com/logankeenan Thanks for making htmx!