htmx 1.1.0 has been released!
htmx 1.1.0 Release
I’m happy to announce the 1.1.0 release of htmx.
This is a surprisingly big release, but the star of the show isn’t htmx itself, but rather the new preload extension which allows you to preload requests into the cache, cutting down on latency. (This extension is used in the htmx website!)
There are also new examples, including keyboard shortcuts and drag and drop list reordering with Sortable.js.
Changes
- Newly added preload extension allows you to preload resources for lower latency requests!
- Support the
ignore:
modifier for extensions - Updated form variable order inclusion to include the enclosing form last so that, in the presence of multiple values, the most relevant value is the most likely to be selected by the server
- Support for the
htmx.ajax()
javascript function, to issue an htmx-style ajax request from javascript - Removed the following htmx request headers for better cache behavior:
HX-Event-Target
,HX-Active-Element
,HX-Active-Element-Name
,HX-Active-Element-Value
- Added the
hx-preserve
attribute, which allows you to preserve elements across requests (for example, to keep a video element playing properly) - The path-deps now surfaces a small api for refreshing path dependencies manually in javascript
- Now support the
from:
clause onhx-trigger
to allow an element to respond to events on other elements. - Added the
htmx:beforeProcessNode
event, renamed the (previously undocumented)htmx:processedNode
tohtmx:afterProcessNode
- Added
closest
syntax support for thehx-indicator
attribute - Added
on load
support for the newest version of hyperscript - Added the
htmx.config.allowEval
configuration value, for CSP compatibility - Bug fixes & improvements
Enjoy!