htmx
htmx copied to clipboard
fix sse-swap removal handling in ext/sse.js
Description
sse.js was not returning from handler after removing event listeners when sse-swap element was replaced/removed from the DOM. This lead to errors when removed element was target for swapping
Corresponding issue: https://discord.com/channels/725789699527933952/1200403330254520320
Testing
I added new test case to test/ext/sse.js and also ran manual tests with the test server
Checklist
- [x] I have read the contribution guidelines
- [x] I have targeted this PR against the correct branch (
masterfor website changes,devfor source changes) - [x] This is either a bugfix, a documentation update, or a new feature that has been explicitly approved via an issue
- [x] I ran the test suite locally (
npm run test) and verified that it succeeded