# Changelog ## [1.8.6] - 2023-03-02 * ESM support! * Sass has been vanquished from the htmx.org website, which should set us up for some good progress going forward * Fixed a bug where the `changed` modifier on `keyup` did not work properly if an input was tabbed into * Many other smaller bug fixes and doc fixes ## [1.8.5] - 2023-01-17 * Support a new optional cache-busting configuration option, `getCacheBusterParam`, to allow browsers to disambiguate between `GET` requests from htmx and from the raw browser * Support new `hx-history='false'` attribute, to prevent sensitive data from being stored in the history cache. (Thank you @croxton!) * Extensive new event-oriented features are available in the [Web Socket](/extensions/web-sockets/) extension (Thank you @Renerick!) * A bug fix for when a form contains multiple empty input values with the same name (Thank you @bluekeyes!) * A bug fix around inputs that throw exceptions when calling `setSelectionRange()` (Thank you @gone!) * A bug fix to pass through the proper event for the `htmx:configRequest` event * A bug fix/improvement for the `preload` extension * Many other small bug fixes ## [1.8.4] - 2022-11-05 * Fix the _exact same_ regression in `revealed` logic as in 1.8.2 ## [1.8.3] - 2022-11-04 * A new [`htmx:confirm` event](/events#htmx:confirm) was added that allows for asynchronous confirmation dialogs to be integrated into htmx requests * The new [head-support](/extensions/head-support) extension allows for more elaborate head tag merging than standard htmx supports. This functionality may be integrated into htmx 2.0, depending on feedback. * The new [multi-swap](/extensions/multi-swap) provides more elaborate swapping of multiple elements on a screen using a custom swap strategy * Many doc fixes (thank you to everyone who contributed!) ## [1.8.2] - 2022-10-12 * Fix regression in `revealed` logic ## [1.8.1] - 2022-10-11 * We now keep a count of outstanding requests for an indicator, so more than one overlapping request can share the same indicator without issues * We now track the attribute state of an element and re-initialize it if `htmx.process()` is called on the element and the attributes have changed * [Idiomorph](https://github.com/bigskysoftware/idiomorph) is now available for all your morph-swapping needs * The `unset` directive now works properly for `hx-vals` and `hx-vars` * The title of the page is now properly set on a history cache miss * The new [`hx-validate`](https://htmx.org/attributes/hx-validate) attribute will force elements to validate before a request, even if they are not within a form being submitted * Many smaller bug and docs fixes ## [1.8.0] - 2022-7-12 * **NOTE**: This release involved some changes to touchy code (e.g. history support) so please test thoroughly and let us know if you see any issues * Boosted forms now will automatically push URLs into history as with links. The [response URL](https://caniuse.com/mdn-api_xmlhttprequest_responseurl) detection API support is good enough that we feel comfortable making this the default now. * If you do not want this behavior you can add `hx-push-url='false'` to your boosted forms * The [`hx-replace-url`](https://htmx.org/attributes/hx-replace-url) attribute was introduced, allowing you to replace the current URL in history (to complement `hx-push-url`) * Bug fix - if htmx is included in a page more than once, we do not process elements multiple times * Bug fix - When localStorage is not available we do not attempt to save history in it * [Bug fix](https://github.com/bigskysoftware/htmx/issues/908) - `hx-boost` respects the `enctype` attribute * `m` is now a valid timing modifier (e.g. `hx-trigger="every 2m"`) * `next` and `previous` are now valid extended query selector modifiers, e.g. `hx-target="next div"` will target the next div from the current element * Bug fix - `hx-boost` will boost anchor tags with a `_self` target * The `load` event now properly supports event filters * The websocket extension has had many improvements: (A huge thank you to Denis Palashevskii, our newest committer on the project!) * 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 * The `HX-Location` response header now implements client-side redirects entirely within htmx * The `HX-Reswap` response header allows you to change the swap behavior of htmx * The new [`hx-select-oob`](https://htmx.org/attributes/hx-select-oob) attribute selects one or more elements from a server response to swap in via an out of band swap * The new [`hx-replace-url`](https://htmx.org/attributes/hx-replace-url) attribute can be used to replace the current URL in the location bar (very similar to `hx-push-url` but no new history entry is created). The corresponding `HX-Replace-Url` response header can be used as well. * htmx now properly handles anchors in both boosted links, as well as in `hx-get`, etc. attributes ## [1.7.0] - 2022-02-22 * The new [`hx-sync`](https://htmx.org/attributes/hx-sync) attribute allows you to synchronize multiple element requests on a single element using various strategies (e.g. replace) * You can also now abort an element making a request by sending it the `htmx:abort` event * [Server Sent Events](/extensions/server-sent-events) and [Web Sockets](/extensions/web-sockets) are now available as extensions, in addition to the normal core support. In htmx 2.0, the current `hx-sse` and `hx-ws` attributes will be moved entirely out to these new extensions. By moving these features to extensions we will be able to add functionality to both of them without compromising the core file size of htmx. You are encouraged to move over to the new extensions, but `hx-sse` and `hx-ws` will continue to work indefinitely in htmx 1.x. * You can now mask out [attribute inheritance](/docs#inheritance) via the [`hx-disinherit`](https://htmx.org/attributes/hx-disinherit) attribute. * The `HX-Push` header can now have the `false` value, which will prevent a history snapshot from occuring. * Many new extensions, with a big thanks to all the contributors! * A new [`alpine-morph`](/extensions/alpine-morph) allows you to use Alpine's swapping engine, which preserves Alpine * A [restored](/extensions/restored) extension was added that will trigger a `restore` event on all elements in the DOM on history restoration. * A [loading-states](/extensions/loading-states) extension was added that allows you to easily manage loading states while a request is in flight, including disabling elements, and adding and removing CSS classes. * The `this` symbol now resolves properly for the [`hx-include`](https://htmx.org/attributes/hx-include) and [`hx-indicator`](https://htmx.org/attributes/hx-indicator) attributes * When an object is included via the [`hx-vals`](https://htmx.org/attributes/hx-vals) attribute, it will be converted to JSON (rather than rendering as the string `[Object object]"`) * You can now pass a swap style in to the `htmx.ajax()` function call. * Poll events now contain a `target` attribute, allowing you to filter a poll on the element that is polling. * Two new Out Of Band-related events were added: `htmx:oobBeforeSwap` & `htmx:oobAfterSwap` ## [1.6.1] - 2021-11-22 * A new `HX-Retarget` header allows you to change the default target of returned content * The `htmx:beforeSwap` event now includes another configurable property: `detail.isError` which can be used to indicate if a given response should be treated as an error or not * The `htmx:afterRequest` event has two new detail properties: `success` and `failed`, allowing you to write trigger filters in htmx or hyperscript: ```applescript on htmx:afterRequest[failed] set #myCheckbox's checked to true ``` * Fixed the `from:` option in [`hx-trigger`](https://htmx.org/attributes/hx-trigger) to support `closest ` and `find ` forms * Don't boost anchor tags with an explicit `target` set * Don't cancel all events on boosted elements, only the events that naturally trigger them (click for anchors, submit for forms) * Persist revealed state in the DOM so that on history navigation, revealed elements are not re-requested * Process all [`hx-ext`](https://htmx.org/attributes/hx-ext) attributes, even if no other htmx attribute is on the element * Snapshot the current URL on load so that history support works properly after a page refresh occurs * Many, many documentation updates (thank you to all the contributors!) ## [1.6.0] - 2021-10-01 * Completely reworked `