1 | # Changelog
|
2 |
|
3 | ## [1.8.5] - 2023-01-??
|
4 |
|
5 | * Support a new optional cache-busting configuration option, `getCacheBusterParam`, to allow browsers to disambiguate
|
6 | between `GET` requests from htmx and from the raw browser
|
7 | * Support new `hx-history='false'` attribute, to prevent sensitive data from being stored in the history cache. (Thank you @croxton!)
|
8 | * Extensive new event-oriented features are available in the [Web Socket](/extensions/web-sockets/) extension (Thank you @Renerick!)
|
9 | * A bug fix for when a form contains multiple empty input values with the same name (Thank you @bluekeyes!)
|
10 | * A bug fix around inputs that throw exceptions when calling `setSelectionRange()` (Thank you @gone!)
|
11 | * A bug fix to pass through the proper event for the `htmx:configRequest` event
|
12 | * A bug fix/improvement for the `preload` extension
|
13 | * Many other small bug fixes
|
14 |
|
15 | ## [1.8.4] - 2022-11-05
|
16 |
|
17 | * Fix the _exact same_ regression in `revealed` logic as in 1.8.2
|
18 |
|
19 | ## [1.8.3] - 2022-11-04
|
20 |
|
21 | * A new [`htmx:confirm` event](/events#htmx:confirm) was added that allows for asynchronous confirmation dialogs to
|
22 | be integrated into htmx requests
|
23 | * The new [head-support](/extensions/head-support) extension allows for more elaborate head tag merging than standard htmx
|
24 | supports. This functionality may be integrated into htmx 2.0, depending on feedback.
|
25 | * The new [multi-swap](/extensions/multi-swap) provides more elaborate swapping of multiple elements on a screen using
|
26 | a custom swap strategy
|
27 | * Many doc fixes (thank you to everyone who contributed!)
|
28 |
|
29 | ## [1.8.2] - 2022-10-12
|
30 |
|
31 | * Fix regression in `revealed` logic
|
32 |
|
33 | ## [1.8.1] - 2022-10-11
|
34 |
|
35 | * We now keep a count of outstanding requests for an indicator, so more than one overlapping request can share the same
|
36 | indicator without issues
|
37 | * We now track the attribute state of an element and re-initialize it if `htmx.process()` is called on the element and
|
38 | the attributes have changed
|
39 | * [Idiomorph](https://github.com/bigskysoftware/idiomorph) is now available for all your morph-swapping needs
|
40 | * The `unset` directive now works properly for `hx-vals` and `hx-vars`
|
41 | * The title of the page is now properly set on a history cache miss
|
42 | * The new [`hx-validate`](https://htmx.org/attributes/hx-validate) attribute will force elements to validate before a request, even if
|
43 | they are not within a form being submitted
|
44 | * Many smaller bug and docs fixes
|
45 |
|
46 | ## [1.8.0] - 2022-7-12
|
47 |
|
48 | * **NOTE**: This release involved some changes to touchy code (e.g. history support) so please test thoroughly and let
|
49 | us know if you see any issues
|
50 | * Boosted forms now will automatically push URLs into history as with links. The [response URL](https://caniuse.com/mdn-api_xmlhttprequest_responseurl)
|
51 | detection API support is good enough that we feel comfortable making this the default now.
|
52 | * If you do not want this behavior you can add `hx-push-url='false'` to your boosted forms
|
53 | * The [`hx-replace-url`](https://htmx.org/attributes/hx-replace-url) attribute was introduced, allowing you to replace
|
54 | the current URL in history (to complement `hx-push-url`)
|
55 | * Bug fix - if htmx is included in a page more than once, we do not process elements multiple times
|
56 | * Bug fix - When localStorage is not available we do not attempt to save history in it
|
57 | * [Bug fix](https://github.com/bigskysoftware/htmx/issues/908) - `hx-boost` respects the `enctype` attribute
|
58 | * `m` is now a valid timing modifier (e.g. `hx-trigger="every 2m"`)
|
59 | * `next` and `previous` are now valid extended query selector modifiers, e.g. `hx-target="next div"` will target the
|
60 | next div from the current element
|
61 | * Bug fix - `hx-boost` will boost anchor tags with a `_self` target
|
62 | * The `load` event now properly supports event filters
|
63 | * The websocket extension has had many improvements: (A huge thank you to Denis Palashevskii, our newest committer on the project!)
|
64 | * Implement proper `hx-trigger` support
|
65 | * Expose trigger handling API to extensions
|
66 | * Implement safe message sending with sending queue
|
67 | * Fix `ws-send` attributes connecting in new elements
|
68 | * Fix OOB swapping of multiple elements in response
|
69 | * The `HX-Location` response header now implements client-side redirects entirely within htmx
|
70 | * The `HX-Reswap` response header allows you to change the swap behavior of htmx
|
71 | * 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
|
72 | * The new [`hx-replace-url`](https://htmx.org/attributes/hx-replace-url) attribute can be used to replace the current URL in the location
|
73 | 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.
|
74 | * htmx now properly handles anchors in both boosted links, as well as in `hx-get`, etc. attributes
|
75 |
|
76 | ## [1.7.0] - 2022-02-22
|
77 |
|
78 | * The new [`hx-sync`](https://htmx.org/attributes/hx-sync) attribute allows you to synchronize multiple element requests on a single
|
79 | element using various strategies (e.g. replace)
|
80 | * You can also now abort an element making a request by sending it the `htmx:abort` event
|
81 | * [Server Sent Events](/extensions/server-sent-events) and [Web Sockets](/extensions/web-sockets) are now available as
|
82 | extensions, in addition to the normal core support. In htmx 2.0, the current `hx-sse` and `hx-ws` attributes will be
|
83 | moved entirely out to these new extensions. By moving these features to extensions we will be able to add functionality
|
84 | to both of them without compromising the core file size of htmx. You are encouraged to move over to the new
|
85 | extensions, but `hx-sse` and `hx-ws` will continue to work indefinitely in htmx 1.x.
|
86 | * You can now mask out [attribute inheritance](/docs#inheritance) via the [`hx-disinherit`](https://htmx.org/attributes/hx-disinherit) attribute.
|
87 | * The `HX-Push` header can now have the `false` value, which will prevent a history snapshot from occuring.
|
88 | * Many new extensions, with a big thanks to all the contributors!
|
89 | * A new [`alpine-morph`](/extensions/alpine-morph) allows you to use Alpine's swapping engine, which preserves Alpine
|
90 | * A [restored](/extensions/restored) extension was added that will trigger a `restore` event on all elements in the DOM
|
91 | on history restoration.
|
92 | * A [loading-states](/extensions/loading-states) extension was added that allows you to easily manage loading states
|
93 | while a request is in flight, including disabling elements, and adding and removing CSS classes.
|
94 | * 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)
|
95 | attributes
|
96 | * When an object is included via the [`hx-vals`](https://htmx.org/attributes/hx-vals) attribute, it will be converted to JSON (rather
|
97 | than rendering as the string `[Object object]"`)
|
98 | * You can now pass a swap style in to the `htmx.ajax()` function call.
|
99 | * Poll events now contain a `target` attribute, allowing you to filter a poll on the element that is polling.
|
100 | * Two new Out Of Band-related events were added: `htmx:oobBeforeSwap` & `htmx:oobAfterSwap`
|
101 |
|
102 | ## [1.6.1] - 2021-11-22
|
103 |
|
104 | * A new `HX-Retarget` header allows you to change the default target of returned content
|
105 | * The `htmx:beforeSwap` event now includes another configurable property: `detail.isError` which can
|
106 | be used to indicate if a given response should be treated as an error or not
|
107 | * The `htmx:afterRequest` event has two new detail properties: `success` and `failed`, allowing you to write
|
108 | trigger filters in htmx or hyperscript:
|
109 | ```applescript
|
110 | on htmx:afterRequest[failed]
|
111 | set #myCheckbox's checked to true
|
112 | ```
|
113 | * Fixed the `from:` option in [`hx-trigger`](https://htmx.org/attributes/hx-trigger) to support `closest <CSS selector>`
|
114 | and `find <CSS selector>` forms
|
115 | * Don't boost anchor tags with an explicit `target` set
|
116 | * Don't cancel all events on boosted elements, only the events that naturally trigger them (click for anchors, submit
|
117 | for forms)
|
118 | * Persist revealed state in the DOM so that on history navigation, revealed elements are not re-requested
|
119 | * Process all [`hx-ext`](https://htmx.org/attributes/hx-ext) attributes, even if no other htmx attribute is on the element
|
120 | * Snapshot the current URL on load so that history support works properly after a page refresh occurs
|
121 | * Many, many documentation updates (thank you to all the contributors!)
|
122 |
|
123 |
|
124 | ## [1.6.0] - 2021-10-01
|
125 |
|
126 | * Completely reworked `<script>` tag support that now supports the `<script src="...'/>` form
|
127 | * You can now use the value `unset` to clear a property that would normally be inherited (e.g. hx-confirm)
|
128 | * The `htmx-added` class is added to new content before a swap and removed after the settle phase, which allows you
|
129 | more flexibility in writing CSS transitions for added content (rather than relying on the target, as with `htmx-settling`)
|
130 | * The `htmx:beforeSwap` event has been updated to allow you to [configure swapping](https://htmx.org/docs/#modifying_swapping_behavior_with_events)
|
131 | behavior
|
132 | * Improved `<title>` extraction support
|
133 | * You can listen to events on the `window` object using the `from:` modifier in `hx-trigger`
|
134 | * The `root` option of the `intersect` event was fixed
|
135 | * Boosted forms respect the `enctype` declaration
|
136 | * The `HX-Boosted` header will be sent on requests from boosted elements
|
137 | * Promises are not returned from the main ajax function unless it is an api call (i.e. `htmx.ajax`)
|
138 |
|
139 | ## [1.5.0] - 2021-7-12
|
140 |
|
141 | * Support tracking of button clicked during a form submission
|
142 | * Conditional polling via the [hx-trigger](https://htmx.org/attributes/hx-trigger) attribute
|
143 | * `document` is now a valid pseudo-selector on the [hx-trigger](https://htmx.org/attributes/hx-trigger) `from:` argument, allowing you
|
144 | to listen for events on the document.
|
145 | * Added the [hx-request](https://htmx.org/attributes/hx-request) attribute, allowing you to configure the following aspects of the request
|
146 | * `timeout` - the timeout of the request
|
147 | * `credentials` - if the request will send credentials
|
148 | * `noHeaders` - strips all headers from the request
|
149 | * Along with the above attribute, you can configure the default values for each of these via the corresponding `htmx.config`
|
150 | properties (e.g. `htmx.config.timeout`)
|
151 | * Both the `scroll` and `show` options on [hx-swap](https://htmx.org/attributes/hx-swap) now support extended syntax for selecting the
|
152 | element to scroll or to show, including the pseudo-selectors `window:top` and `window:bottom`.
|
153 |
|
154 | ## [1.4.1] - 2021-6-1
|
155 |
|
156 | * typo fix
|
157 |
|
158 | ## [1.4.0] - 2021-5-25
|
159 |
|
160 | * Added the `queue` option to the [hx-trigger](https://htmx.org/attributes/hx-trigger) attribute, allowing you to specify how events
|
161 | should be queued when they are received with a request in flight
|
162 | * The `htmx.config.useTemplateFragments` option was added, allowing you to use HTML template tags for parsing content
|
163 | from the server. This allows you to use Out of Band content when returning things like table rows, but it is not
|
164 | IE11 compatible.
|
165 | * The `defaultSettleDelay` was dropped to 20ms from 100ms
|
166 | * Introduced a new synthetic event, [intersect](https://htmx.org/docs#pecial-events) that allows you to trigger when an item is scrolled into view
|
167 | as specified by the `IntersectionObserver` API
|
168 | * Fixed timing issue that caused exceptions in the `reveal` logic when scrolling at incredible speeds - <https://github.com/bigskysoftware/htmx/issues/463>
|
169 | * Fixed bug causing SVG titles to be incorrectly used as page title - <https://github.com/bigskysoftware/htmx/issues/459>
|
170 | * Boosted forms that issue a GET will now push the URL by default - <https://github.com/bigskysoftware/htmx/issues/485>
|
171 | * Better dispatch of request events when an element is removed from the DOM
|
172 | * Fixed a bug causing `hx-prompt` to fail
|
173 | * The `htmx.config.withCredentials` option was added, to send credentials with ajax requests (default is `false`)
|
174 | * The `throttle` option on `hx-trigger` does not delay the initial request any longer
|
175 | * The `meta` key is ignored on boosted links
|
176 | * `<script>` tags are now evaluated in the global scope
|
177 | * `hx-swap` now supports the `none` option
|
178 | * Safari text selection bug - <https://github.com/bigskysoftware/htmx/issues/438>
|
179 |
|
180 | ## [1.3.3] - 2021-4-5
|
181 |
|
182 | * Added the [`hx-disabled`](https://htmx.org/docs#security) attribute to allow htmx to be turned off for parts of the DOM
|
183 | * SSE now uses a full-jitter exponential backoff algorithm on reconnection, using the `htmx.config.wsReconnectDelay`
|
184 | setting
|
185 |
|
186 | ## [1.3.2] - 2021-3-9
|
187 |
|
188 | * Bug fixes
|
189 |
|
190 | ## [1.3.1] - 2021-3-9
|
191 |
|
192 | * IE11 fixes
|
193 |
|
194 | ## [1.3.0] - 2021-3-6
|
195 |
|
196 | * Support a `target` modifier on `hx-trigger` to filter based on the element targeted by an event. This allows
|
197 | lazy binding to that target selector.
|
198 | * Events are no longer consumed by the first element that might handle them, unless the `consume` keyword is
|
199 | added to the `hx-trigger` specification
|
200 | * Added the `htmx:beforeSend` event, fired just before an ajax request begins
|
201 | * SSE swaps are properly settled
|
202 | * Fixed bug that was improperly cancelling all clicks on anchors
|
203 | * `htmx.ajax()` now returns a promise
|
204 |
|
205 | ## [1.2.1] - 2021-2-19
|
206 |
|
207 | * Fixed an issue with the history cache, where the cache was getting blown out after the first navigation backwards
|
208 | * Added the `htmx.config.refreshOnHistoryMiss` option, allowing users to trigger a full page refresh on history cache miss
|
209 | rather than issuing an AJAX request
|
210 |
|
211 | ## [1.2.0] - 2021-2-13
|
212 |
|
213 | ### New Features
|
214 |
|
215 | * `hx-vars` has been deprecated in favor of `hx-vals`
|
216 | * `hx-vals` now supports a `javascript:` prefix to achieve the behavior that `hx-vars` provided
|
217 | * The new `hx-headers` attribute allows you to add headers to a request via an attribute. Like `hx-vals` it supports
|
218 | JSON or javascript via the `javascript:` prefix
|
219 | * `hx-include` will now include all inputs under an element, even if that element is not a form tag
|
220 | * The [preload extension](https://htmx.org/extensions/preload/) now offers a `preload-images="true"` attribute that will aggressively load images in preloaded content
|
221 | * On requests driven by a history cache miss, the new `HX-History-Restore-Request` header is included so that the server
|
222 | can differentiate between history requests and normal requests
|
223 |
|
224 | ### Improvements & Bug fixes
|
225 |
|
226 | * Improved handling of precedence of input values to favor the enclosing form (see [here](https://github.com/bigskysoftware/htmx/commit/a10e43d619dc340aa324d37772c06a69a2f47ec9))
|
227 | * Moved event filtering logic *after* `preventDefault` so filtering still allows events to be properly handled
|
228 | * No longer trigger after swap events on elements that have been removed via an `outerHTML` swap
|
229 | * Properly remove event handlers added to other elements when an element is removed from the DOM
|
230 | * Handle the `scroll:` modifier in `hx-swap` properly when an `outerHTML` swap occurs
|
231 | * Lots of docs fixes
|
232 |
|
233 | ## [1.1.0] - 2021-1-6
|
234 |
|
235 | * Newly added [preload extension](https://htmx.org/extensions/preload/) allows you to preload resources for lower
|
236 | latency requests!
|
237 | * Support the `ignore:` modifier for extensions
|
238 | * Updated form variable order inclusion to include the enclosing form *last* so that, in the presence of multiple
|
239 | values, the most relevant value is the most likely to be selected by the server
|
240 | * Support for the [`htmx.ajax()`](https://dev.htmx.org/api/#ajax) javascript function, to issue an htmx-style ajax
|
241 | request from javascript
|
242 | * Removed the following htmx request headers for better cache behavior: `HX-Event-Target`, `HX-Active-Element`,
|
243 | `HX-Active-Element-Name`, `HX-Active-Element-Value`
|
244 | * Added the [`hx-preserve`](https://dev.htmx.org/attributes/hx-preserve) attribute, which allows
|
245 | you to preserve elements across requests (for example, to keep a video element playing properly)
|
246 | * The [path-deps](https://dev.htmx.org/extensions/path-deps/#refresh) now surfaces a small api
|
247 | for refreshing path dependencies manually in javascript
|
248 | * Now support the `from:` clause on [`hx-trigger`](https://dev.htmx.org/attributes/hx-trigger) to
|
249 | allow an element to respond to events on other elements.
|
250 | * Added the `htmx:beforeProcessNode` event, renamed the (previously undocumented) `htmx:processedNode` to `htmx:afterProcessNode`
|
251 | * Added `closest` syntax support for the [`hx-indicator`](https://dev.htmx.org/attributes/hx-indicator) attribute
|
252 | * Added `on load` support for the newest version of [hyperscript](https://hyperscript.org)
|
253 | * Added the `htmx.config.allowEval` configuration value, for CSP compatibility
|
254 | * Bug fixes & improvements
|
255 |
|
256 | ## [1.0.2] - 2020-12-12
|
257 |
|
258 | * Extend all API methods to take a string selector as well as an element
|
259 | * Out of band swap elements need not be top level now
|
260 | * [`hx-swap-oob`](https://htmx.org/attributes/hx-swap-oob) now can accept a CSS selector to retarget with
|
261 |
|
262 | ## [1.0.1] - 2020-12-04
|
263 |
|
264 | * AJAX file upload now correctly fires events, allowing for [a proper progress bar](https://htmx.org/examples/file-upload)
|
265 | * htmx api functions that expect an element now can accept a string selector instead:
|
266 | ```js
|
267 | htmx.on('#form', 'htmx:xhr:progress', function(evt) {
|
268 | htmx.find('#progress').setAttribute('value', evt.detail.loaded/evt.detail.total * 100)
|
269 | });
|
270 | ```
|
271 | * htmx now properly handles the `multiple` attribute on `<select>` elements
|
272 |
|
273 | ## [1.0.0] - 2020-11-24
|
274 |
|
275 | * Bumped the release version :)
|
276 |
|
277 | ## [0.4.1] - 2020-11-23
|
278 |
|
279 | * Fixed bug with title tag support when title tag contained HTML entities
|
280 | * Pass properties for the `loadstart`, `loadend`, `progress`, `abort` events through properly to the htmx equivalents
|
281 |
|
282 | ## [0.4.0] - 2020-11-16
|
283 |
|
284 | * Now support the `HX-Redirect` and `HX-Refresh` response headers for redirecting client side and triggering a page refresh, respectively
|
285 | * `hx-vars` now overrides input values
|
286 | * `<title>` tags in responses will be used to update page titles
|
287 | * All uses of `eval()` have been removed in favor of `Function`
|
288 | * [`hx-vals`](https://htmx.org/attributes/hx-vals) is available as a safe alternative to `hx-vars`. It uses `JSON.parse()` rather than evaluation, if you wish to safely pass user-provided values through to htmx.
|
289 |
|
290 | ## [0.3.0] - 2020-10-27
|
291 |
|
292 | * `hx-trigger` parsing has been rewritten and now supports [trigger filters](https://htmx.org/docs/#trigger-filters) to filter
|
293 | events based on arbitrary javascript expressions
|
294 | * htmx now supports two additional response headers `HX-Trigger-After-Swap` and `HX-Trigger-After-Settle` allowing
|
295 | an event to be triggered after a given life cycle event (instead of before the swap)
|
296 | * The `requestConfig` is now passed out to events surrounding the AJAX life cycle
|
297 | * htmx now evaluates `<script>` tags as javascript when no language is defined on them
|
298 | * A new [`event-header`](https://htmx.org/extensions/event-header) extension, which will include a serialized JSON representation of the triggering event in requests
|
299 |
|
300 | ## [0.2.0] - 2020-9-30
|
301 |
|
302 | * AJAX file upload [support](https://htmx.org/docs#files)
|
303 | * The HTML validation API is [respected](https://htmx.org/docs#validation)
|
304 |
|
305 | ## [0.1.0] - 2020-9-18
|
306 |
|
307 | * *BREAKING CHANGE*: The SSE attribute [`hx-sse`](https://htmx.org/attributes/hx-sse/) and the Web Sockets attribute [`hx-ws`](https://htmx.org/attributes/hx-ws) have changed syntax to now use colon separators: `hx-sse='connect:/chat swap:message'`
|
308 | * The SSE attribute [`hx-sse`](https://htmx.org/attributes/hx-sse/) allows for swapping content directly on an event, in addition to triggering an htmx element,
|
309 | with the new `swap:<event name>` syntax.
|
310 | * [`hx-target`](https://htmx.org/attributes/hx-target) now supports a `find` syntax to find elements below the element by a CSS selector
|
311 | * htmx plays better with deferred loading and many package managers
|
312 | * All htmx events are dispatched in both camelCase as well as kebab-case, for better compatibility with AlpineJS and other frameworks. (e.g. `htmx:afterOnLoad` will also be triggered as
|
313 | `htmx:after-on-load`)
|
314 | * [hypeerscript](https://hyperscript.org) is now initialized independently of htmx
|
315 |
|
316 | ## [0.0.8] - 2020-7-8
|
317 |
|
318 | * The `view` modifier on `hx-swap` has been renamed to `show`: `hx-swap='innerHTML show:top'`
|
319 |
|
320 | ## [0.0.7] - 2020-6-30
|
321 |
|
322 | * The [`hx-swap`](https://htmx.org/attributes/hx-swap) attribute now supports two new modifiers:
|
323 | * `scroll` - allows you to scroll the target to the `top` or `bottom`
|
324 | * `view` - allows you to scroll the `top` or `bottom` of the target into view
|
325 | * The [`hx-push-url`](https://htmx.org/attributes/hx-push-url) attribute now can optionally take a URL to push, in addition to `true` and `false`
|
326 | * Added the [`hx-vars`](https://htmx.org/attributes/hx-vars) attribute that allows you to dynamically add to the parameters that will be submitted with a request
|
327 |
|
328 | ## [0.0.6] - 2020-6-20
|
329 |
|
330 | * Custom request/response headers no longer start with the `X-` prefix, which is no longer recommended
|
331 | * empty verb attributes are now allowed and follow the anchor tag semantics (e.g. `<div hx-get></div>`)
|
332 | * nunjuks inline rendering is now supported in the `client-side-templates` extension
|
333 | * the new `ajax-header` extension includes the `X-Requested-With` header
|
334 | * bad JSON is now handled more gracefully
|
335 | * `hx-swap="none"` will cause no swap to take place <https://github.com/bigskysoftware/htmx/issues/89>
|
336 | * `hx-trigger` now supports a `throttle` modifier <https://github.com/bigskysoftware/htmx/issues/88>
|
337 | * the focused element is preserved if possible after a replacement
|
338 | * perf improvements for large DOM trees with sparse `hx-` annotations
|
339 |
|
340 | ## [0.0.4] - 2020-5-24
|
341 |
|
342 | * Extension mechanism added
|
343 | * SSE support added
|
344 | * WebSocket support added
|
345 |
|
346 | ## [0.0.3] - 2020-5-17
|
347 |
|
348 | * Renamed to htmx
|
349 | * A bug fix for the `hx-prompt` attribute
|
350 | * A bug fix for multiple `hx-swap-oob` attributes
|
351 | * Moved the default CSS indicator injection into its own sheet to avoid breaking
|
352 | * Added the `htmx.config.includeIndicatorStyles` configuration option so people can opt out of injecting the indicator CSS
|
353 |
|
354 |
|
355 | ## [0.0.1] - 2020-5-15
|
356 |
|
357 | * Initial release (originally named kutty)
|
358 |
|
\ | No newline at end of file |