bigskysoftware / bigskysoftware/htmx
beforeSwap and afterSwap events should also log hx-swap setting
- Dominant language
- JavaScript
- Stars
- 49.4k
- Forks
- 1.7k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 30
Description
The beforeSwap and afterSwap events when logged to the console don't contain the actual (inherited) `hx-swap` setting.
I was debugging an expected swap that didn't occur. I added logging to the console as [described here](https://htmx.org/docs/#logging).
AJAX response was correct, target was correct, isError = false, shouldSwap = true, failed = false, succesful = true, as shown here:
It didn't occur to me that I should explicitly set the `hx-swap="innerHTML"` attribute since that is the default. But I didn't know `hx-swap="none"` was set on the `` tag and it was inherited to the whole DOM tree.
If `hx-swap: 'none'` would have been reflected in the log, I would have caught and fixed the issue much earlier.
Contributor guide
Assessment
This issue has not been assessed yet.