Open yardenshoham opened 2 days ago
What happens to any potential JS event handlers in the swapped HTML when HTMX does the swap? How do we make sure that event handlers that need to be added to new cards are bound correctly after the swap? Likely there are currently no such event handlers, but it is something that must be considered when doing such swaps.
This is true for any HTMX swap. This pull request is not the first one. There are no event handlers attached to the cards so we should be ok.
We make sure the user cards are updated
I also removed
ctx.Data["PageIsWatchers"] = true
andctx.Data["PageIsStargazers"] = true
as they are not used anywhere.Before
After