Closed sopa0 closed 1 month ago
Matter of fact, after taking a look at the ws extension and its docs, it seems like it defaults to hx-swap-oob doesn't it? I'll push a few more changes, as here we'd need to support both hx-swap-oob properly and regular swaps
Oops, didn't mean to close this PR when deleting dev
@sopa0 , I messed up, can you retarget to main
? 😆
haha don't worry, i'm going to create a new one with different logic anyway, I don't think straight up copying from the ws extension was the best move anyway
haha don't worry, i'm going to create a new one with different logic anyway, I don't think straight up copying from the ws extension was the best move anyway
@sopa0 what was the PR # for that?
haha don't worry, i'm going to create a new one with different logic anyway, I don't think straight up copying from the ws extension was the best move anyway
@sopa0 what was the PR # for that?
afaik the PR was actually not needed, I did some more testing and hx-swap-oob seems to work properly with hx-sse (using htmx 2.0.2 and htmx-ext-sse 2.2.2)
Hi! I'm interested in how you made hx-swap-oob to work with hx-sse, I have a problem where I want to swap different fragments with the data of sse events. The hx-trigger="sse:foo" hx-get="/foo" is too expensive for the backend I want to broadcast updates of different components from the server to the user with sse. In some cases I would need beforeend swaps or outterHtml swaps.
Hi!
Added hx-swap-oob functionality to the sse extension, + 2 tests cases that test for hx-swap-oob -> swaps correctly and hx-swap-oob + regular swap
Code is basically from the ws extension
Cheers