htmx icon indicating copy to clipboard operation
htmx copied to clipboard

Add handleHistorySwap extension function

Open wbobeirne opened this issue 3 years ago • 2 comments

Closes #749.

This adds handleHistorySwap as a method for extensions to allow them to control the HTML swapping of browser history behavior. I considered just adding a new swapType of history and keep using handleSwap, but my concern was that older extensions wouldn't necessarily know to check for that and might start behaving incorrectly.

I didn't add any tests since history didn't have any, but I saw there were manual tests for it. If this is an acceptable change, I could add some manual test pages for it too.

wbobeirne avatar Jan 03 '22 23:01 wbobeirne

Would it be possible to add a manual test for this in test/manual?

1cg avatar Jan 14 '22 18:01 1cg

Pinging again on tests and docs on this. I'm going to cut a 1.7 release in a week or so, so lmk if you want it in for that.

1cg avatar Feb 04 '22 18:02 1cg

Closing this PR because it's a year and a half old. Feel free to rebase and re-open if you're still interested.

alexpetros avatar Jul 17 '23 15:07 alexpetros

Apologies on letting this go stale. Not currently working on the project I used htmx for so no worries, if someone else finds a need for this they can pick it back up!

wbobeirne avatar Jul 17 '23 15:07 wbobeirne