Combining sse
and oob
#2104
Replies: 5 comments
-
Having SSE support out-of-band swaps would also make the SSE extension more in line with the WebSocket extension:
|
Beta Was this translation helpful? Give feedback.
-
I need this also, in my case i have element listening to its status with sse and once its completed should trigger a notification |
Beta Was this translation helpful? Give feedback.
-
I second this, support for out-of-bands swaps would be great! |
Beta Was this translation helpful? Give feedback.
-
Is this implemented? I always thought this is possible, turns out not to be. |
Beta Was this translation helpful? Give feedback.
-
hi guys |
Beta Was this translation helpful? Give feedback.
-
I'd like to keep the element replacement logic on the server side, so ideally I want to send
oob
swaps from the server and on certain events. Is there a way of achieving this? I understand it is possible to usehx-trigger
to manipulate content in this style, however I prefer using the oob swaps in most cases and that gets me into messy code when I haveinnerHTML
andouterHTML
versions of the same snippet.Alternatively, is there a way of registering new elements to listen to events when you stream them through sse? For instance, when I replace an element with a
hx-trigger
with a new sse event, it will nto listen for it (which is the main reason I end up having to do acrobatics in the first place 😅 )Beta Was this translation helpful? Give feedback.
All reactions