Combining sse
and oob
#2104
Unanswered
fliepeltje
asked this question in
Q&A
Replies: 2 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.
0 replies
-
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.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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