I am running HTMX with hx-boost and the history cache disabled (it's important to not show stale content to my users unless my backend uses cache-control headers to do so, in which case I simply rely on the fetch being cached). However, during 'history cache misses', the page title is not properly set.
This fixes it (mirroring the logic in `handleAjaxResponse`).
keep local URL anchors along for the magical ride into the history API, and scroll to the target directly to avoid adding a junk history entry along the way
have i mentioned that I hate the javascript history API?
this fixes an ugly bug introduced when the trigger logic was pulled out, where the handler of the first revealed element was used over and over again for any future elements that also were revealed. many braincells lost mmm.
* Adding support for client side boosted redirects
* First pass at hx-boost-redirect
* Fixing some small documentation issues
* Rename boost-redirect to Location
* Implement proper `hx-trigger` support
* Expose trigger handling API to extensions
* Implement safe message sending with sending queue
* Fix `ws-send` attributes connecting in new elements
* Fix OOB swapping of multiple elements in response
This addresses problems using the WebSocket extension to send messages to a websocket server. We were calling `shouldCancel` with the incorrect API signature, causing it to return FALSE (as in, don't cancel the event) when it should have returned TRUE (as in, yes, cancel the event)
I don't know why this worked in my tests before, but the test case it behaving correctly now.
* Add data-loading-aria-busy directive for loading-states extension; add tests for the extension
* Update docs
* Fix tests of scoped loading states
* Commit test files
* Improve delay tests by using sinon timer
* Add reference to MDN about `aria-busy` attribute
* Add global config `scrollOnFocus`
* Change global to `defaultFocusScroll` and add new swap `focus-scroll` modifier
`focus-scroll` modifier accepts "true" and "false" values.
* Rename variables
* Code cleanup
* Add loading-states extension
* Add extension to the extensions list
* Remove duplicate reference to client-side-templates
* Remove duplicate entry to debug
How did this happen?!
absolute 👑
* Restore WS and SSE code
First pass at restoring removed ws and sse code. More to come.
* More progress on WS and SSE restore
* Update htmx.js
crucial whitespace
* Update documentation
* Combine SSE and WS servers into single "realtime" demo
* Realtime Test Server Updates
- separated tests for old- and new- style calling
- updated intro content and stylesheet
- removed extensions from manual test suite
* Remove SSE/WS from manual tests