bigskysoftware / bigskysoftware/htmx
htmx:beforeSwap event is not emitted for the hx-swap-oob swaps
Open
- Dominant language
- JavaScript
- Stars
- 49.4k
- Forks
- 1.7k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 30
Description
When response contains `hx-swap-oob` elements, `htmx:beforeSwap` event is only emitted for the main content only, while `html:afterSwap` events are emitted for all the swaps.
In my case I have a main content that is replaced with `hx-boost` and every response contains 3 additional `hx-swap-oob` elements to be replaced. I have both listeners for the `htmx:beforeSwap` and `htmx:afterSwap`events and here is how the console.log statements look when request is completed:
Contributor guide
Assessment
This issue has not been assessed yet.