-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
Hey,
I have a webapp that needs some kind of connection-tracking (online-offline). I use the SSE ext. for triggering updates in my frontend.
On connection loss, I open a modal like this:
htmx.on("htmx:sseError", function(evt){
console.log("SSE disconnect");
htmx.addClass(htmx.find("#disconnect-modal"), "is-active");
It would be great to also have a lifecycle event for reconnection or connection at all. I tried to access the eventSource object from the internal data to add a callback to onopen but it does not work.
How about adding an event htmx:sseOpen to the sse extension?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels