initial release notes

This commit is contained in:
carson 2022-02-05 17:00:16 -07:00
parent 932c7d5f61
commit 71892e8338

View File

@ -0,0 +1,47 @@
---
layout: layout.njk
tags: ['posts', 'announcements']
title: htmx 1.7.0 has been released!
date: 2022-02-17
---
## htmx 1.7.0 Release
I'm happy to announce the [1.7.0 release](https://unpkg.com/browse/htmx.org@1.7.0/) of htmx.
### New Features
* **BREAKING CHANGE:** both Server Sent Events and Web Socket support have been pulled out of the core to extensions.
This will allow us to continue to improve those pieces of functionality without blowing the size of the core library
out. We strive to avoid breaking changes in minor releases, so we apologize for this. The API itself has not changed
(although there is a newer syntax you can use) but the way that these features are included in an htmx application has:
* Include the relevant extension file (`/ext/sse.js` or `/ext/ws.js`)
* Add the following extension declaration to the `body tag`:
```html
<body hx-ext="sse">...</body>
or...
<body hx-ext="ws">...</body>
```
We apologize for the inconvenience!
state.
* The new [`hx-sync`](/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
* You can now mask out [attribute inheritance](/docs#inheritance) via the [`hx-disinherit`](/attributes/hx-disinherit) attribute.
* The `HX-Push` header can now have the `false` value, which will prevent a history snapshot from occuring.
* 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.
* The `this` symbol now resolves properly for the [`hx-include`](/attributes/hx-include) and [`hx-indicator`](/attributes/hx-indicator)
attributes
* When an object is included via the [`hx-vals`](/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`
### Improvements & Bug fixes
* Many, many documentation updates (thank you to all the contributors!)
Enjoy!