What is the advantage over just using this:
var source = new EventSource('pull?name=one');
source.onmessage = function (event) {
document.getElementById('events').innerHTML += event.data;
};
http://talk.rupy.se/event.html> If you need bi-directional communication, then you should consider using WebSockets instead.
Or you just do a HTTP request?
Everything HTMX does could be "just" done using JS - this is self-evident. The whole point of HTMX is to enable features like this directly in HTML.
HTMX can do much more than just innerHTML swap.
https://htmx.org/attributes/hx-swap/ https://htmx.org/attributes/hx-swap-oob/ https://htmx.org/attributes/hx-target/