htmx
htmx copied to clipboard
[RFC] Always use latest `href`/`hx-*` in `hx-boost`
hx-boost seems to capture the href/hx-get/etc of an element when the boosting logic is setup.
But if the element changes its href since it was created, hx-boost will cause it to redirect to the wrong location. While opening that link in a new tab/window (bypassing hx-boost) will sent to the correct URL.
This proposed change would -- when performing an AJAX request -- revalidate that the element should be boosted and compute the verb/path at that time.
Thanks for your consideration! :)
I like this change but I'd like to do it for hx-get, etc. as well. Are you willing to look at that bigger change?
We recently moved our hx-boost usage to turbolinks (while still using HTMX for everything else), so I probably won't have the bandwidth to get to this. Sorry! :)