You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe that having a shouldSwap boolean field on the htmx:sseBeforeMessage event detail would make this event more useful. There are situations, I have personally come across them, where we don't want to swap in the SSE message and being able to opt out of that would be very useful.
I can make a PR for this. In my own project I have found that it can be achieved very easily.
// swap the response into the DOM and trigger a notificationevent.shouldSwap=trueif(!api.triggerEvent(elt,'htmx:sseBeforeMessage',event)){return}if(event.shouldSwap){swap(elt,event.data)api.triggerEvent(elt,'htmx:sseMessage',event)}
The text was updated successfully, but these errors were encountered:
I believe that having a
shouldSwap
boolean field on thehtmx:sseBeforeMessage
event detail would make this event more useful. There are situations, I have personally come across them, where we don't want to swap in the SSE message and being able to opt out of that would be very useful.I can make a PR for this. In my own project I have found that it can be achieved very easily.
The text was updated successfully, but these errors were encountered: