| 1 | # Changelog |
| 2 | |
| 3 | ## [4.0.0-beta5] - 2026-06-26 |
| 4 | |
| 5 | * New `hx-prompt` extension, restoring the htmx 2 `hx-prompt` attribute ([#3828](https://github.com/bigskysoftware/htmx/pull/3828)) |
| 6 | * `hx-live` expansion: declarative bindings + reactive engine ([#3814](https://github.com/bigskysoftware/htmx/pull/3814)), JSON data proxy ([#3822](https://github.com/bigskysoftware/htmx/pull/3822)), xpath + Alpine conflict handling ([#3820](https://github.com/bigskysoftware/htmx/pull/3820)), `take` defaults to sibling scope ([#3816](https://github.com/bigskysoftware/htmx/pull/3816)) |
| 7 | * Added `swapEmpty` swap modifier and `htmx.config.defaultSwapEmpty`; SSE now defaults to not swapping empty responses ([#3862](https://github.com/bigskysoftware/htmx/pull/3862)) |
| 8 | * Morph: `morphSkip` / `morphSkipChildren` now default to `[hx-morph-skip]` / `[hx-morph-skip-children]` selectors for server-driven, declarative morph freezing ([#3864](https://github.com/bigskysoftware/htmx/pull/3864)) |
| 9 | * Morph scan no longer bails on a focused non-text element, preserving sibling input values ([#3868](https://github.com/bigskysoftware/htmx/pull/3868)) |
| 10 | * `hx-encode` falls back to the form's `enctype` ([#3865](https://github.com/bigskysoftware/htmx/pull/3865)) |
| 11 | * Download links (`<a download>`) are no longer boosted ([#3866](https://github.com/bigskysoftware/htmx/pull/3866)) |
| 12 | * Added `ctx` context to `hx-confirm`, `hx-vals`, and `hx-headers` ([#3832](https://github.com/bigskysoftware/htmx/pull/3832)) |
| 13 | * `optimistic` extension now supports live content ([#3824](https://github.com/bigskysoftware/htmx/pull/3824)) |
| 14 | * Click modifiers now pass through only on links ([#3855](https://github.com/bigskysoftware/htmx/pull/3855)) |
| 15 | * `hx-preload` uses passive event listeners to avoid touchstart warnings ([#3848](https://github.com/bigskysoftware/htmx/pull/3848)) |
| 16 | * Formalized HCON parsing and comma-aware splitting ([#3859](https://github.com/bigskysoftware/htmx/pull/3859)) |
| 17 | * Fix: `browser-indicator` no longer clobbers history state on boosted nav; adds a `canIntercept` guard ([#3861](https://github.com/bigskysoftware/htmx/pull/3861)) |
| 18 | * Fix: cleanup of htmx attributes for reinit during morph ([#3834](https://github.com/bigskysoftware/htmx/pull/3834)) |
| 19 | * Fix: improved text-node morphing for Firefox ([#3836](https://github.com/bigskysoftware/htmx/pull/3836)) |
| 20 | * Fix: `hx-prompt` Unicode header encoding ([#3846](https://github.com/bigskysoftware/htmx/pull/3846)) |
| 21 | * Fix: `__proto__` literal mangled by the build `sed` step ([#3858](https://github.com/bigskysoftware/htmx/pull/3858)) |
| 22 | * Fix: `hx-csp` nonce rewriting handles unquoted nonce attributes |
| 23 | * Many smaller fixes and a website overhaul |
| 24 | |
| 25 | ## [4.0.0-beta4] - 2026-05-22 |
| 26 | |
| 27 | * Unified `hx-on` and `hx-trigger` modifier grammar ([#3805](https://github.com/bigskysoftware/htmx/pull/3805)) |
| 28 | * New `hx-on="event mods -> code"` syntax with full trigger-modifier support |
| 29 | * Added `prevent`, `stop`, `halt`, `capture`, `passive`, `from:self`, `from:outside` modifiers |
| 30 | * Removed dot-modifiers from `hx-on:event` (`.prevent` `.stop` `.halt` `.once` `.self` `.outside` `.capture` `.passive` `.cc`) |
| 31 | * Added `rootMargin` support on `intersect` |
| 32 | * Removed `queue` modifier from `hx-trigger` (use `hx-sync`) |
| 33 | * The `hx-nonce` extension was renamed to `hx-csp` |
| 34 | * Improved non-form input and checkbox handling ([#3797](https://github.com/bigskysoftware/htmx/pull/3797)) |
| 35 | * Fix: `outerSync` reprocesses the correct body element on history restore ([#3808](https://github.com/bigskysoftware/htmx/pull/3808)) |
| 36 | * Fix: `hx-ws:send` with `hx-trigger="load"` waits for socket open instead of erroring ([#3806](https://github.com/bigskysoftware/htmx/pull/3806)) |
| 37 | * Fix: attribute-value reading with custom `metaCharacter` ([#3795](https://github.com/bigskysoftware/htmx/pull/3795)) |
| 38 | |
| 39 | ## [4.0.0-beta3] - 2026-05-08 |
| 40 | |
| 41 | * New `hx-live` extension: adds DOM-reactivity via the `hx-live` attribute and a richer JavaScript surface inside `hx-on` |
| 42 | * `hx-live="..."` a JS expression that re-evaluates whenever any DOM input/change/mutation event fires on the page |
| 43 | * `q(selector)` proxy: jQuery-like proxy over a set of elements. Supports `next`/`prev`/`closest`/`first`/`last` selectors, `'.foo in .bar'` scoping, set-property forwarding (`q('.x').value = 'y'` writes to all), array methods (`map`/`filter`/`reduce`/...), and chainable mutators (`.trigger`, `.insert`, `.take`, `.toggle`). |
| 44 | * Sigil-syntax `toggle(...specs)` — `toggle('.class')`, `toggle('@attr')`, `toggle('@x=on|off')` (cycle), `toggle('*display=none|block')` (style cycle). |
| 45 | * Per-element `debounce(ms[, fn])` — closure form (channel-keyed by `fn.toString()`) and promise form (cancellation via async rejection). |
| 46 | * `htmx.live` namespace exposes the same primitives outside expression scope: `htmx.live.q`, `htmx.live.take(target, className, source)`, etc. |
| 47 | * **Breaking**: `htmx.takeClass` and `htmx.forEvent` moved out of htmx core |
| 48 | * New `hx-nonce` extension: CSP nonce-based protection for inline scripts and `eval`-style code paths. Blocks elements without a matching `hx-nonce`, integrates with TrustedTypes, and defends against `js:`/`javascript:` action URLs and unnonced boosted-form submitters. |
| 49 | * `htmx.config.prefix` now defaults to `"data-hx-"`, so both `hx-*` and `data-hx-*` attributes work out of the box matching htmx 2 behavior. Set to `""` to disable. ([#3744](https://github.com/bigskysoftware/htmx/pull/3744)) |
| 50 | * Added `htmx:response:error` event for HTTP 4xx/5xx responses, restoring the convenience of htmx 2's `htmx:responseError` ([#3755](https://github.com/bigskysoftware/htmx/issues/3755)) |
| 51 | * Added `outerSync` swap style: copies attributes onto the existing target and replaces children, useful for clean `<body>` swaps in history replacement. ([#3778](https://github.com/bigskysoftware/htmx/pull/3778)) |
| 52 | * Restored `hx-history-elt` from htmx 2 and improved the `hx-history-cache` extension. ([#3773](https://github.com/bigskysoftware/htmx/pull/3773)) |
| 53 | * `hx-download` extension now auto-detects downloads via `Content-Disposition` header, no need for `hx-download` attribute on individual elements. ([#3756](https://github.com/bigskysoftware/htmx/pull/3756)) |
| 54 | * `hx-preload` extension gained boost-related config knobs (`boostEvent`, `boostTimeout`, `autoBoost`). |
| 55 | * Switched runtime indicator CSS to a constructable stylesheet to avoid CSP `unsafe-inline` violations. ([#3766](https://github.com/bigskysoftware/htmx/pull/3766)) |
| 56 | * `hx-config` no longer accepts request `mode` overrides, fixes privilege-escalation surface where a swap could downgrade origin enforcement. ([#3788](https://github.com/bigskysoftware/htmx/pull/3788)) |
| 57 | * Added Unicode-id encoding fix for selector handling. ([#3784](https://github.com/bigskysoftware/htmx/pull/3784)) |
| 58 | * Fixed CSP violation from inline style write on internal pantry element. ([#3753](https://github.com/bigskysoftware/htmx/issues/3753)) |
| 59 | * Fixed Alpine history restoration so it replays without errors. ([#3774](https://github.com/bigskysoftware/htmx/pull/3774)) |
| 60 | * Many smaller fixes |
| 61 | * This is release candidate 1 |
| 62 | |
| 63 | ## [4.0.0-beta2] - 2026-04-14 |
| 64 | |
| 65 | * Added `upgrade-check` CLI tool for migrating htmx 2.x projects to 4.x (`npx htmx.org@next upgrade-check`) |
| 66 | * Bug Fixes |
| 67 | * Fixed comma handling in trigger spec parsing (e.g. `click[myFunc(a,b)]`) ([#3738](https://github.com/bigskysoftware/htmx/pull/3738)) |
| 68 | * Fixed extension packaging by removing `exports` rule from `package.json` ([#3737](https://github.com/bigskysoftware/htmx/pull/3737)) |
| 69 | * Added back stream accept header on all SSE-enabled requests ([#3733](https://github.com/bigskysoftware/htmx/pull/3733)) |
| 70 | * Fixed settle events not bubbling after `outerHTML` swaps ([#3739](https://github.com/bigskysoftware/htmx/pull/3739)) |
| 71 | * Fixed `hx-location` ignoring explicit `push: false` when combined with `replace` ([#3740](https://github.com/bigskysoftware/htmx/pull/3740)) |
| 72 | * Removed accidental `playwright` dependency ([#3747](https://github.com/bigskysoftware/htmx/pull/3747)) |
| 73 | |
| 74 | ## [4.0.0-beta1] - 2026-04-06 |
| 75 | |
| 76 | * Added `hx-history-cache` extension for client-side history caching via `sessionStorage` / `history.state` ([#3698](https://github.com/bigskysoftware/htmx/pull/3698)) |
| 77 | * Added `htmax.js` — a bundled distribution including the most popular opt-in extensions |
| 78 | * Aligned WS and SSE extension APIs: consistent event detail shapes, `api.triggerHtmxEvent`/`api.htmxProp` usage, renamed `htmx.config.websockets` to `htmx.config.ws` ([#3717](https://github.com/bigskysoftware/htmx/pull/3717)) |
| 79 | * WS: orphaned connection cleanup, `pauseOnBackground`, exponential backoff with jitter, per-element config, `HX-Request-ID` correlation, `{headers, body}` send format, legacy attribute compat |
| 80 | * SSE: legacy `sse-connect` compat, exposed config on connection object |
| 81 | * Restored `hx-on::` shorthand from htmx 2 ([#3711](https://github.com/bigskysoftware/htmx/pull/3711)) |
| 82 | * Bug Fixes |
| 83 | * Fixed `hx-sync` `this` resolution ([#3698](https://github.com/bigskysoftware/htmx/pull/3698)) |
| 84 | * Fixed processing of non-Element nodes (ShadowRoot, DocumentFragment) |
| 85 | * Preserved JSON types in WS `hx-vals` handling ([#3718](https://github.com/bigskysoftware/htmx/pull/3718)) |
| 86 | |
| 87 | ## [4.0.0-alpha8] - 2026-03-16 |
| 88 | |
| 89 | * Extracted SSE from core into standalone extension (`hx-sse.js`) ([#3666](https://github.com/bigskysoftware/htmx/pull/3666)) |
| 90 | * An all new website rebuilt with Astro by @scriptogre (https://github.com/bigskysoftware/htmx/pull/3703) |
| 91 | * New core extensions |
| 92 | * Added `hx-targets` extension for multi-error targeting by HTTP status code |
| 93 | * Added `hx-download` extension for file download swaps |
| 94 | * Added `hx-browser-indicator` extension to show the browser's native loading indicator |
| 95 | * Added `hx-ptag` extension, replacing previous etag-based behavior that played poorly w/the default browser behavior |
| 96 | * Submit inputs (`<input type="submit">`) now use `click` as the default trigger |
| 97 | * Smaller Additions |
| 98 | * Added `ctx.vals` for extension use ([#3689](https://github.com/bigskysoftware/htmx/pull/3689)) |
| 99 | * Added async `<head>` tag support ([#3686](https://github.com/bigskysoftware/htmx/pull/3686)) |
| 100 | * Added `htmx:before:morph:node` extension hook event for per-node morph control |
| 101 | * Bug Fixes |
| 102 | * WS and SSE now properly adjust attribute names when `metaCharacter` is set |
| 103 | * Indicators and timeout no longer activate until after confirmation dialog completes |
| 104 | * Keep indicators active on redirect-refresh ([#3688](https://github.com/bigskysoftware/htmx/pull/3688)) |
| 105 | * Fixed `outerMorph` handling when new nodes are inserted ([#3667](https://github.com/bigskysoftware/htmx/pull/3667)) |
| 106 | * Boosted method resolution properly uppercased |
| 107 | * Boosted forms now push URLs correctly |
| 108 | * Ensure only one history restoration request is in flight at a time |
| 109 | * Fixed zero timeout handling ([#3692](https://github.com/bigskysoftware/htmx/pull/3692)) |
| 110 | * Fixed empty non-GET action handling ([#3661](https://github.com/bigskysoftware/htmx/pull/3661)) |
| 111 | * Fixed `<title>` extraction to avoid matching SVG `<title>` tags |
| 112 | * Fixed CSS-escape IDs when morphing |
| 113 | * Fixed preserved element skip issue during morphing |
| 114 | * Fixed `onLoad` event name normalization with `metaCharacter` ([#3695](https://github.com/bigskysoftware/htmx/pull/3695)) |
| 115 | * Many smaller fixes |
| 116 | |
| 117 | ## [4.0.0-alpha7] - 2025-02-12 |
| 118 | |
| 119 | * Added focus and selection restoration after swaps, matching htmx 2.x behavior ([#3645](https://github.com/bigskysoftware/htmx/pull/3645)) |
| 120 | * Added Alpine.js compatibility extension ([#3654](https://github.com/bigskysoftware/htmx/pull/3654)) |
| 121 | * `hx-get` and `hx-delete` on elements inside forms no longer include enclosing form inputs (use `hx-include="closest form"` if needed) |
| 122 | * `htmx:before:request` and `htmx:after:request` events now fire on the target element |
| 123 | * History restoration now always uses `innerHTML` swap ([#3655](https://github.com/bigskysoftware/htmx/pull/3655)) |
| 124 | * Partials now fall back to use the main swap's transition setting ([#3656](https://github.com/bigskysoftware/htmx/pull/3656)) |
| 125 | * Improved morph matching algorithm ([#3647](https://github.com/bigskysoftware/htmx/pull/3647)) |
| 126 | * Fixed morph error with empty `id` attributes ([#3639](https://github.com/bigskysoftware/htmx/pull/3639)) |
| 127 | * Fixed Firefox not handling script tags in templates ([#3650](https://github.com/bigskysoftware/htmx/pull/3650)) |
| 128 | * Fixed full page response parsing for live script support ([#3629](https://github.com/bigskysoftware/htmx/pull/3629)) |
| 129 | * Fixed iOS Safari SSE disconnect when app is backgrounded ([#3640](https://github.com/bigskysoftware/htmx/pull/3640)) |
| 130 | * Fixed SSE field value parsing to only trim first leading space ([#3589](https://github.com/bigskysoftware/htmx/pull/3589)) |
| 131 | * WebSocket extension: added raw HTML message support with cancelable event ([#3641](https://github.com/bigskysoftware/htmx/pull/3641)) |
| 132 | * WebSocket extension: added script tag processing ([#3636](https://github.com/bigskysoftware/htmx/pull/3636), [#3637](https://github.com/bigskysoftware/htmx/pull/3637)) |
| 133 | * WebSocket extension: now uses `htmx.swap()` internally ([#3638](https://github.com/bigskysoftware/htmx/pull/3638)) |
| 134 | |
| 135 | ## [4.0.0-alpha6] - 2025-12-31 |
| 136 | |
| 137 | * Re-introduced swap/settle mechanism from 2.0 for CSS transitions |
| 138 | * Extension hooks: `htmx_after_restore` replaced with `htmx_before_settle` and `htmx_after_settle` |
| 139 | * Added `upsert` swap style - updates existing elements by ID and inserts new ones ([#3595](https://github.com/bigskysoftware/htmx/pull/3595)) |
| 140 | * Added `textContent` swap style - replaces text content without parsing HTML ([#3593](https://github.com/bigskysoftware/htmx/pull/3593)) |
| 141 | * History now uses response URL when server redirects ([#3608](https://github.com/bigskysoftware/htmx/pull/3608)) |
| 142 | * Fixed `hx-preserve` handling when preserved element ID not found ([#3610](https://github.com/bigskysoftware/htmx/pull/3610)) |
| 143 | * Fixed cross-domain request URL handling |
| 144 | * Improved morph matching with exact node scan-ahead ([#3591](https://github.com/bigskysoftware/htmx/pull/3591)) |
| 145 | * WebSocket extension improvements ([#3592](https://github.com/bigskysoftware/htmx/pull/3592)) |
| 146 | * Settle events now fire on target element (not document) for better event handling |
| 147 | * Optimized async handling in `hx-vals` and `hx-headers` ([#3581](https://github.com/bigskysoftware/htmx/pull/3581)) |
| 148 | |
| 149 | ## [4.0.0-alpha5] - 2025-12-08 |
| 150 | |
| 151 | * **BREAKING**: View transitions now default to `false` (previously `true`) |
| 152 | * **BREAKING**: Moved the htmx meta config name from `htmx:config` back to `htmx-config` |
| 153 | * Fixed `hx-indicator` attribute handling |
| 154 | * Added support for transition overrides on OOB and partial swaps ([#3570](https://github.com/bigskysoftware/htmx/pull/3570)) |
| 155 | * Added morph skip support for Web Components ([#3573](https://github.com/bigskysoftware/htmx/pull/3573)) |
| 156 | * Implemented advanced `hx-boost` configuration overrides ([#3549](https://github.com/bigskysoftware/htmx/pull/3549), [#3572](https://github.com/bigskysoftware/htmx/pull/3572)) |
| 157 | * Added `mergeConfig` support and improved `hx-config` merging ([#3561](https://github.com/bigskysoftware/htmx/pull/3561)) |
| 158 | * Fixed `hx-validate` to respect `noValidate` and validate inputs outside of forms ([#3562](https://github.com/bigskysoftware/htmx/pull/3562)) |
| 159 | * Fixed bug with empty response after partial removal detection ([#3569](https://github.com/bigskysoftware/htmx/pull/3569)) |
| 160 | * Removed `htmx.config.historyReload` in favor of `htmx.config.history = 'reload'` |
| 161 | |
| 162 | ## [4.0.0-alpha4] - 2025-11-27 |
| 163 | |
| 164 | * WebSocket extension for htmx 4.0 ([#3547](https://github.com/bigskysoftware/htmx/pull/3547)) |
| 165 | * Allow string swapSpecs in `insertContent()` ([#3551](https://github.com/bigskysoftware/htmx/pull/3551)) |
| 166 | * Added `HX-Target`, `HX-Source`, and `HX-Request-Type` request headers ([#3548](https://github.com/bigskysoftware/htmx/pull/3548)) |
| 167 | * Handle duplicates in action query params and form data ([#3543](https://github.com/bigskysoftware/htmx/pull/3543)) |
| 168 | * Changed extension registration to `registerExtension()` to avoid upgrade confusion ([#3546](https://github.com/bigskysoftware/htmx/pull/3546)) |
| 169 | |
| 170 | ## [4.0.0-alpha3] - 2025-11-18 |
| 171 | |
| 172 | * Added `HX-Source` request header containing element `id` ([#3533](https://github.com/bigskysoftware/htmx/pull/3533)) |
| 173 | * Re-added `HX-Current-URL` request header ([#3533](https://github.com/bigskysoftware/htmx/pull/3533)) |
| 174 | * Extensions can now handle custom `<hx-*>` template tags via `htmx:process:*` events ([#3537](https://github.com/bigskysoftware/htmx/pull/3537)) |
| 175 | * `hx-confirm` now fires `htmx:confirm` event with async `issueRequest()` callback for custom confirmation dialogs ([#3532](https://github.com/bigskysoftware/htmx/pull/3532)) |
| 176 | * `hx-status` can now set multiple context properties using config syntax ([#3528](https://github.com/bigskysoftware/htmx/pull/3528)) |
| 177 | * `hx-vals` now supports `js:` prefix for JavaScript expressions ([#3516](https://github.com/bigskysoftware/htmx/pull/3516)) |
| 178 | * Unified configuration parser across all attributes, removed separate tokenizer ([#3516](https://github.com/bigskysoftware/htmx/pull/3516)) |
| 179 | * Form data collection now uses native `FormData(form)` to support Web Components ([#3523](https://github.com/bigskysoftware/htmx/pull/3523)) |
| 180 | * Fixed `htmx.ajax()` API target/source resolution issues ([#3528](https://github.com/bigskysoftware/htmx/pull/3528)) |
| 181 | * Thanks to @MichaelWest22 for the majority of this release! |
| 182 | |
| 183 | ## [4.0.0-alpha1] - 2025-11-3 |
| 184 | |
| 185 | * See https://four.htmx.org/htmx-4/ |
| 186 | |
| 187 | ## [2.0.8] - 2025-10-24 |
| 188 | |
| 189 | * [Updated](https://github.com/bigskysoftware/htmx/commit/b9336a96fbdcf28550699971dc2218a90c7a4e01) `parseHTML` to use to use the (unfortunately named) [`Document.parseHTMLUnsafe()`](https://developer.mozilla.org/en-US/docs/Web/API/Document/parseHTMLUnsafe_static) |
| 190 | method for better Web Components support |
| 191 | * [Added](https://github.com/bigskysoftware/htmx/commit/83a1449a89b1fcd1c1655039ede02d74d61e4800) `pushURL` option to the `htmx.ajax()` API |
| 192 | * [Fixed](https://github.com/bigskysoftware/htmx/commit/cd045c3e0eb31776a80e3a4b4c74e37d0631c1f1) `hx-sync` and `htmx:abort` within the Shadow Dom [Issue 3419](https://github.com/bigskysoftware/htmx/issues/3419) |
| 193 | * [Fixed](https://github.com/bigskysoftware/htmx/commit/04d6c7249b7fd7b8518ddca92e7a70fdcc651b34) a long-standing bug in history support with respect to relative paths [Issue 3449](https://github.com/bigskysoftware/htmx/issues/3449) |
| 194 | * Once again, this is a release mainly done by @MichaelWest22's heroic work, thank you! |
| 195 | |
| 196 | ## [2.0.7] - 2025-09-08 |
| 197 | |
| 198 | * Fix not preventing link when inside htmx enabled element (fixes https://github.com/bigskysoftware/htmx/issues/3395) |
| 199 | * Implement `reportValidity()` for reporting proper form validation errors behind config flag (fixes https://github.com/bigskysoftware/htmx/issues/2372) |
| 200 | * Update indicator style to have `visibility:hidden` for screen readers (fixes https://github.com/bigskysoftware/htmx/issues/3354) |
| 201 | * Bugfix: swap="outerHTML" on <div> with style attribute leaves htmx-swapping class behind (see https://github.com/bigskysoftware/htmx/pull/3341) |
| 202 | |
| 203 | ## [2.0.6] - 2025-06-27 |
| 204 | |
| 205 | * [Fix](https://github.com/bigskysoftware/htmx/pull/3357) a [regression](https://github.com/bigskysoftware/htmx/issues/3356) |
| 206 | with htmx-powered links that contain other elements in them issuing full page refreshes |
| 207 | |
| 208 | ## [2.0.5] - 2025-06-20 |
| 209 | |
| 210 | * 100% test coverage! (Thank you @MichaelWest22!) |
| 211 | * The default recommended CDN is now jsDelivr |
| 212 | * The `inherit` keyword is now supported by `hx-include`, `hx-indicator` and `hx-disabled-elt` to allow you to inherit |
| 213 | the value from a parent and extend it. |
| 214 | * `hx-on` listeners are now added before processing nodes so events during processing can be captured |
| 215 | * Using `<button hx-verb="/endpoint" type="reset">` will now reset the associated form (after submitting to `/endpoint`) |
| 216 | * Using `<button formmethod="dialog">` will no longer submit its associated form |
| 217 | * Local history cache now uses `sessionStorage` rather than `localStorage` so cross-tab contamination doesn't occur |
| 218 | * History restoration now follows the standard swapping code paths |
| 219 | * Many other smaller bug and documentation fixes |
| 220 | |
| 221 | ## [2.0.4] - 2024-12-13 |
| 222 | |
| 223 | * Calling `htmx.ajax` with no target or source now defaults to body (previously did nothing) |
| 224 | * Nested [shadow root](https://github.com/bigskysoftware/htmx/commit/5ab508f6523a37890932176f7dc54be9f7a281ff) fix |
| 225 | * The `htmx:trigger` event now properly fires on the synthetic `load` event |
| 226 | * The synthetic `load` event will not be re-called when an element is reinitialized via `htmx.process()` |
| 227 | * Boosted `<form>` tags that issue a `GET` with no or empty `action` attributes will properly replace all existing query |
| 228 | parameters |
| 229 | * Events that are triggered on htmx-powered elements located outside a form, but that refer to a form via the`form` |
| 230 | attribute, now properly cancel the submission of the referred-to form |
| 231 | * Extension Updates |
| 232 | * `preload` extension was |
| 233 | [completely reworked](https://github.com/bigskysoftware/htmx-extensions/commit/fb68dfb48063505d2d7420d717c24ac9a8dae244) |
| 234 | by @marisst to be compatible with `hx-boost`, not cause side effect, etc. Thank you! |
| 235 | * `response-targets` was updated to not use deprecated methods |
| 236 | * A [small fix](https://github.com/bigskysoftware/htmx-extensions/commit/e87e1c3d0bf728b4e43861c7459f3f937883eb99) to |
| 237 | `ws` to avoid an error when closing in some cases |
| 238 | * The `head-support` extension was updated to work with the `sse` extension |
| 239 | |
| 240 | ## [2.0.3] - 2024-10-03 |
| 241 | * Added support for the experimental `moveBefore()` functionality in [Chrome Canary](https://www.google.com/chrome/canary/), |
| 242 | see the [demo page](/patterns/move-before) for more information. |
| 243 | * Fixed `revealed` event when a resize reveals an element |
| 244 | * Enabled `hx-preserve` in oob-swaps |
| 245 | * Better degredation of `hx-boost` on forms with query parameters in their `action` |
| 246 | * Improved shadowRoot support |
| 247 | * Many smaller bug fixes |
| 248 | * Moved the core extension documentation back to <https://htmx.org/extensions> |
| 249 | |
| 250 | ## [2.0.2] - 2024-08-12 |
| 251 | * no longer boost forms of type `dialog` |
| 252 | * properly trigger the `htmx:trigger` event when an event is delayed or throttled |
| 253 | * file upload is now fixed |
| 254 | * empty templates that are not used for oob swaps are no longer removed from the DOM |
| 255 | * request indicators are not removed when a full page redirect or refresh occurs |
| 256 | * elements that have been disabled for a request are properly re-enabled before snapshotting for history |
| 257 | * you can now trigger events on other elements using the `HX-Trigger` response header |
| 258 | * The `.d.ts` file should now work properly |
| 259 | |
| 260 | ## [2.0.1] - 2024-07-12 |
| 261 | |
| 262 | * Make the `/dist/htmx.esm.js` file the `main` file in `package.json` to make installing htmx smoother |
| 263 | * Update `htmx.d.ts` & include it in the distribution |
| 264 | * A fix to avoid removing text-only templates on htmx cleanup |
| 265 | * A fix for outerHTML swapping of the `body` tag |
| 266 | * Many docs fixes |
| 267 | |
| 268 | ## [2.0.0] - 2024-06-17 |
| 269 | |
| 270 | * Removed extensions and moved to their own repos linked off of <https://extensions.htmx.org> |
| 271 | * The website now supports dark mode! (Thanks [@pokonski](https://github.com/pokonski)!) |
| 272 | * The older, deprecated [SSE & WS](https://v1.htmx.org/docs/) attributes were removed TODO fix link |
| 273 | * Better support for [Web Components & Shadow DOM](https://htmx.org/patterns/web-components/) |
| 274 | * HTTP `DELETE` requests now use parameters, rather than form encoded bodies, for their payload (This is in accordance w/ the spec.) |
| 275 | * Module support was split into different files: |
| 276 | * We now provide specific files in `/dist` for the various JavaScript module styles: |
| 277 | * ESM Modules: `/dist/htmx.esm.js` |
| 278 | * AMD Modules: `/dist/htmx.amd.js` |
| 279 | * CJS Modules: `/dist/htmx.cjs.js` |
| 280 | * The `/dist/htmx.js` file continues to be browser-loadable |
| 281 | * The `hx-on` attribute, with its special syntax, has been removed in favor of the less-hacky `hx-on:` syntax. |
| 282 | * See the [Upgrade Guide](https://htmx.org/migration-guide-htmx-1/) for more details on upgrade steps |
| 283 | * The `selectAndSwap()` internal API method was replaced with the public (and much better) [`swap()`](/api/#swap) method |
| 284 | |
| 285 | ## [1.9.12] - 2024-04-17 |
| 286 | |
| 287 | * [IE Fixes](https://github.com/bigskysoftware/htmx/commit/e64238dba3113c2eabe26b1e9e9ba7fe29ba3010) |
| 288 | |
| 289 | ## [1.9.11] - 2024-03-15 |
| 290 | |
| 291 | * Fix for new issue w/ web sockets & SSE on iOS 17.4 (thanks apple!) |
| 292 | * Fix for double script execution issue when using template parsing |
| 293 | * Fix TypeScript types file |
| 294 | * Fix SSE Ext: reinstantiate EventSource listeners upon reconnection logic (#2272) |
| 295 | |
| 296 | ## [1.9.10] - 2023-12-21 |
| 297 | |
| 298 | * `hx-on*` attributes now support the form `hx-on-`, with a trailing dash, to better support template systems (such as EJS) |
| 299 | that do not like double colons in HTML attributes. |
| 300 | * Added an `htmx.config.triggerSpecsCache` configuration property that can be set to an object to cache the trigger spec parsing |
| 301 | * Added a `path-params.js` extension for populating request paths with variable values |
| 302 | * Many smaller bug fixes & improvements |
| 303 | |
| 304 | ## [1.9.9] - 2023-11-21 |
| 305 | |
| 306 | * Allow CSS selectors with whitespace in attributes like `hx-target` by using parens or curly-braces |
| 307 | * Properly allow users to override the `Content-Type` request header |
| 308 | * Added the `select` option to `htmx.ajax()` |
| 309 | * Fixed a race condition in readystate detection that lead to htmx not being initialized in some scenarios with 3rd |
| 310 | party script loaders |
| 311 | * Fixed a bug that caused relative resources to resolve against the wrong base URL when a new URL is pushed |
| 312 | * Fixed a UI issue that could cause indicators to briefly flash |
| 313 | |
| 314 | ## [1.9.8] - 2023-11-06 |
| 315 | |
| 316 | * Fixed a few npm & build related issues |
| 317 | |
| 318 | ## [1.9.7] - 2023-11-03 |
| 319 | |
| 320 | * Fixed a bug where a button associated with a form that is swapped out of the DOM caused errors |
| 321 | * The `hx-target-error` attribute was added to the `response-targets` extension, allowing you to capture all 400 & 500 |
| 322 | responses with a single attribute |
| 323 | * `hx-on` now properly supports multiple listeners |
| 324 | * The `hx-confirm` prompt is now passed into custom confirmation handlers |
| 325 | * `next` and `previous` are now valid _extended CSS_ symbols in htmx |
| 326 | * The `htmx:beforeHistoryUpdate` event was added |
| 327 | * Properly ignore the `dialog` formmethod on buttons when resolving the HTTP method to use |
| 328 | * Added a `htmx.config.scrollIntoViewOnBoost` option that may be set to `false` to disable scrolling the top of the |
| 329 | body into view for boosted elements |
| 330 | |
| 331 | ## [1.9.6] - 2023-09-22 |
| 332 | |
| 333 | * IE support has been restored (thank you @telroshan!) |
| 334 | * Introduced the `hx-disabled-elt` attribute to allow specifying elements to disable during a request |
| 335 | * You can now explicitly decide to ignore `title` tags found in new content via the `ignoreTitle` option in `hx-swap` and the `htmx.config.ignoreTitle` configuration variable. |
| 336 | * `hx-swap` modifiers may be used without explicitly specifying the swap mechanism |
| 337 | * Arrays are now supported in the `client-side-templates` extension |
| 338 | * XSLT support in the `client-side-templates` extension |
| 339 | * Support `preventDefault()` in extension event handling |
| 340 | * Allow the `HX-Refresh` header to apply even after an `HX-Redirect` has occurred |
| 341 | * the `formaction` and `formmethod` attributes on buttons are now properly respected |
| 342 | * `hx-on` can now handle events with dots in their name |
| 343 | * `htmx.ajax()` now always returns a Promise |
| 344 | * Handle leading `style` tag parsing more effectively |
| 345 | |
| 346 | ## [1.9.5] - 2023-08-25 |
| 347 | |
| 348 | * Web sockets now properly pass the target id in the HEADERS struct |
| 349 | * A very rare loading state bug was fixed (see https://github.com/bigskysoftware/htmx/commit/93bd81b6d003bb7bc445f10192bdb8089fa3495d) |
| 350 | * `hx-on` will not evaluate if `allowEval` is set to false |
| 351 | * You can disable the interpretation of script tags with the new `htmx.config.allowScriptTags` config variable |
| 352 | * You can now disable htmx-based requests to non-origin hosts via the `htmx.config.selfRequestsOnly` config variable |
| 353 | * The [Security](https://htmx.org/docs#security) section has been expanded to help developers better understand how to |
| 354 | properly secure their htmx-based applications. |
| 355 | |
| 356 | ## [1.9.4] - 2023-07-25 |
| 357 | |
| 358 | * This is a bug-fix release for the most part, w/a heavy dose of @telroshan |
| 359 | * The `HX-Trigger` response header now supports comma separated event names |
| 360 | * Submit buttons that use the `form` attribute now work correctly |
| 361 | * The `changed` modifier now uses the triggering element, rather than the element the `hx-trigger` is defined on |
| 362 | * `hx-disable` is now handled dynamically so it can be added and removed |
| 363 | * IE11 compatibility restored! (maybe, hard to test) |
| 364 | * Fixed bug with `hx-on` event handler cleanup |
| 365 | * Many smaller bug fixes, typo fixes and general improvements |
| 366 | |
| 367 | ## [1.9.3] - 2023-07-14 |
| 368 | |
| 369 | * The `hx-on` attribute has been deprecated (sorry) in favor of `hx-on:<event name>` attributes. See [`hx-on`](/attributes/hx-on) for more information. |
| 370 | * We now have functioning CI using GitHub actions! |
| 371 | * You can now configure if a type of HTTP request uses the body for parameters or not. In particular, the `DELETE` _should_ use |
| 372 | query parameters, according to the spec. htmx has used the body, instead. To avoid breaking code we are keeping this undefined |
| 373 | behavior for now, but allowing people to fix it for their use cases by updating the `htmx.config.methodsThatUseUrlParams` config |
| 374 | option. Thank you to Alex and Vincent for their feedback and work on this issue! |
| 375 | * The `this` symbol is now available in event filter expressions, and refers to the element the `hx-trigger` is on |
| 376 | * Fix bug where the `htmx:afterSettle` event was raised multiple times with oob swaps occurred |
| 377 | * A large number of accessibility fixes were made in the docs (Thank you Denis & crew!) |
| 378 | * Fixed bug w/ WebSocket extension initialization caused by "naked" `hx-trigger` feature |
| 379 | * The `HX-Reselect` HTTP response header has been added to change the selection from the returned content |
| 380 | * Many other smaller bug fixes |
| 381 | |
| 382 | ## [1.9.2] - 2023-04-28 |
| 383 | |
| 384 | * Fixed bug w/ `hx-on` not properly de-initializing |
| 385 | |
| 386 | ## [1.9.1] - 2023-04-27 |
| 387 | |
| 388 | * Fixed a bug with the new naked triggers that prevented boosted elements with explicit `hx-trigger`'s from functioning |
| 389 | properly |
| 390 | * Added code to play well with other libraries that also use the `window.onpopstate` Daily reminder: <https://htmx.org/img/memes/javascripthistory.png> |
| 391 | |
| 392 | ## [1.9.0] - 2023-04-11 |
| 393 | |
| 394 | * Support for generalized inline event handling via the new [`hx-on`](/attributes/hx-on) attribute, which addresses |
| 395 | the shortcoming of limited [`onevent` properties](https://developer.mozilla.org/en-US/docs/Web/Events/Event_handlers#using_onevent_properties) attributes in HTML. |
| 396 | * Support for [view transitions](/docs#view-transitions), based on the experimental [View Transitions API](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API) |
| 397 | currently available in Chrome 111+ and coming to other browsers soon. |
| 398 | * Support for "naked" [`hx-trigger`](/attributes/hx-trigger) attributes, where an `hx-trigger` is present on an element |
| 399 | that does not have an `hx-get`, etc. defined on it. Instead, it will trigger the new `htmx:triggered` event, which can |
| 400 | be responded to via your [preferred scripting solution](/docs#scripting). |
| 401 | * A memory leak fix by [@croxton](https://github.com/bigskysoftware/htmx/commit/8cd3a480a7388877628ce8b9b8e50cd5df48bb81) |
| 402 | * The htmx website has been migrated from 11ty to [zola](https://www.getzola.org/) by [@danieljsummers](https://github.com/danieljsummers), cutting |
| 403 | way down on the number of "development" javascript dependencies |
| 404 | * Many other smaller bug fixes |
| 405 | |
| 406 | ## [1.8.6] - 2023-03-02 |
| 407 | |
| 408 | * ESM support! |
| 409 | * Sass has been vanquished from the htmx.org website, which should set us up for some good progress going forward |
| 410 | * Fixed a bug where the `changed` modifier on `keyup` did not work properly if an input was tabbed into |
| 411 | * Many other smaller bug fixes and doc fixes |
| 412 | |
| 413 | ## [1.8.5] - 2023-01-17 |
| 414 | |
| 415 | * Support a new optional cache-busting configuration option, `getCacheBusterParam`, to allow browsers to disambiguate |
| 416 | between `GET` requests from htmx and from the raw browser |
| 417 | * Support new `hx-history='false'` attribute, to prevent sensitive data from being stored in the history cache. (Thank you @croxton!) |
| 418 | * Extensive new event-oriented features are available in the [Web Socket](/extensions/web-sockets/) extension (Thank you @Renerick!) |
| 419 | * A bug fix for when a form contains multiple empty input values with the same name (Thank you @bluekeyes!) |
| 420 | * A bug fix around inputs that throw exceptions when calling `setSelectionRange()` (Thank you @gone!) |
| 421 | * A bug fix to pass through the proper event for the `htmx:configRequest` event |
| 422 | * A bug fix/improvement for the `preload` extension |
| 423 | * Many other small bug fixes |
| 424 | |
| 425 | ## [1.8.4] - 2022-11-05 |
| 426 | |
| 427 | * Fix the _exact same_ regression in `revealed` logic as in 1.8.2 |
| 428 | |
| 429 | ## [1.8.3] - 2022-11-04 |
| 430 | |
| 431 | * A new [`htmx:confirm` event](/events#htmx:confirm) was added that allows for asynchronous confirmation dialogs to |
| 432 | be integrated into htmx requests |
| 433 | * The new [head-support](/extensions/head-support) extension allows for more elaborate head tag merging than standard htmx |
| 434 | supports. This functionality may be integrated into htmx 2.0, depending on feedback. |
| 435 | * The new [multi-swap](/extensions/multi-swap) provides more elaborate swapping of multiple elements on a screen using |
| 436 | a custom swap strategy |
| 437 | * Many doc fixes (thank you to everyone who contributed!) |
| 438 | |
| 439 | ## [1.8.2] - 2022-10-12 |
| 440 | |
| 441 | * Fix regression in `revealed` logic |
| 442 | |
| 443 | ## [1.8.1] - 2022-10-11 |
| 444 | |
| 445 | * We now keep a count of outstanding requests for an indicator, so more than one overlapping request can share the same |
| 446 | indicator without issues |
| 447 | * We now track the attribute state of an element and re-initialize it if `htmx.process()` is called on the element and |
| 448 | the attributes have changed |
| 449 | * [Idiomorph](https://github.com/bigskysoftware/idiomorph) is now available for all your morph-swapping needs |
| 450 | * The `unset` directive now works properly for `hx-vals` and `hx-vars` |
| 451 | * The title of the page is now properly set on a history cache miss |
| 452 | * The new [`hx-validate`](https://htmx.org/attributes/hx-validate) attribute will force elements to validate before a request, even if |
| 453 | they are not within a form being submitted |
| 454 | * Many smaller bug and docs fixes |
| 455 | |
| 456 | ## [1.8.0] - 2022-7-12 |
| 457 | |
| 458 | * **NOTE**: This release involved some changes to touchy code (e.g. history support) so please test thoroughly and let |
| 459 | us know if you see any issues |
| 460 | * Boosted forms now will automatically push URLs into history as with links. The [response URL](https://caniuse.com/mdn-api_xmlhttprequest_responseurl) |
| 461 | detection API support is good enough that we feel comfortable making this the default now. |
| 462 | * If you do not want this behavior you can add `hx-push-url='false'` to your boosted forms |
| 463 | * The [`hx-replace-url`](https://htmx.org/attributes/hx-replace-url) attribute was introduced, allowing you to replace |
| 464 | the current URL in history (to complement `hx-push-url`) |
| 465 | * Bug fix - if htmx is included in a page more than once, we do not process elements multiple times |
| 466 | * Bug fix - When localStorage is not available we do not attempt to save history in it |
| 467 | * [Bug fix](https://github.com/bigskysoftware/htmx/issues/908) - `hx-boost` respects the `enctype` attribute |
| 468 | * `m` is now a valid timing modifier (e.g. `hx-trigger="every 2m"`) |
| 469 | * `next` and `previous` are now valid extended query selector modifiers, e.g. `hx-target="next div"` will target the |
| 470 | next div from the current element |
| 471 | * Bug fix - `hx-boost` will boost anchor tags with a `_self` target |
| 472 | * The `load` event now properly supports event filters |
| 473 | * The websocket extension has had many improvements: (A huge thank you to Denis Palashevskii, our newest committer on the project!) |
| 474 | * Implement proper `hx-trigger` support |
| 475 | * Expose trigger handling API to extensions |
| 476 | * Implement safe message sending with sending queue |
| 477 | * Fix `ws-send` attributes connecting in new elements |
| 478 | * Fix OOB swapping of multiple elements in response |
| 479 | * The `HX-Location` response header now implements client-side redirects entirely within htmx |
| 480 | * The `HX-Reswap` response header allows you to change the swap behavior of htmx |
| 481 | * 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 |
| 482 | * The new [`hx-replace-url`](https://htmx.org/attributes/hx-replace-url) attribute can be used to replace the current URL in the location |
| 483 | 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. |
| 484 | * htmx now properly handles anchors in both boosted links, as well as in `hx-get`, etc. attributes |
| 485 | |
| 486 | ## [1.7.0] - 2022-02-22 |
| 487 | |
| 488 | * The new [`hx-sync`](https://htmx.org/attributes/hx-sync) attribute allows you to synchronize multiple element requests on a single |
| 489 | element using various strategies (e.g. replace) |
| 490 | * You can also now abort an element making a request by sending it the `htmx:abort` event |
| 491 | * [Server Sent Events](/extensions/server-sent-events) and [Web Sockets](/extensions/web-sockets) are now available as |
| 492 | extensions, in addition to the normal core support. In htmx 2.0, the current `hx-sse` and `hx-ws` attributes will be |
| 493 | moved entirely out to these new extensions. By moving these features to extensions we will be able to add functionality |
| 494 | to both of them without compromising the core file size of htmx. You are encouraged to move over to the new |
| 495 | extensions, but `hx-sse` and `hx-ws` will continue to work indefinitely in htmx 1.x. |
| 496 | * You can now mask out [attribute inheritance](/docs#inheritance) via the [`hx-disinherit`](https://htmx.org/attributes/hx-disinherit) attribute. |
| 497 | * The `HX-Push` header can now have the `false` value, which will prevent a history snapshot from occurring. |
| 498 | * Many new extensions, with a big thanks to all the contributors! |
| 499 | * A new [`alpine-morph`](/extensions/alpine-morph) allows you to use Alpine's swapping engine, which preserves Alpine |
| 500 | * A [restored](/extensions/restored) extension was added that will trigger a `restore` event on all elements in the DOM |
| 501 | on history restoration. |
| 502 | * A [loading-states](/extensions/loading-states) extension was added that allows you to easily manage loading states |
| 503 | while a request is in flight, including disabling elements, and adding and removing CSS classes. |
| 504 | * 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) |
| 505 | attributes |
| 506 | * When an object is included via the [`hx-vals`](https://htmx.org/attributes/hx-vals) attribute, it will be converted to JSON (rather |
| 507 | than rendering as the string `[Object object]"`) |
| 508 | * You can now pass a swap style in to the `htmx.ajax()` function call. |
| 509 | * Poll events now contain a `target` attribute, allowing you to filter a poll on the element that is polling. |
| 510 | * Two new Out Of Band-related events were added: `htmx:oobBeforeSwap` & `htmx:oobAfterSwap` |
| 511 | |
| 512 | ## [1.6.1] - 2021-11-22 |
| 513 | |
| 514 | * A new `HX-Retarget` header allows you to change the default target of returned content |
| 515 | * The `htmx:beforeSwap` event now includes another configurable property: `detail.isError` which can |
| 516 | be used to indicate if a given response should be treated as an error or not |
| 517 | * The `htmx:afterRequest` event has two new detail properties: `success` and `failed`, allowing you to write |
| 518 | trigger filters in htmx or hyperscript: |
| 519 | ```applescript |
| 520 | on htmx:afterRequest[failed] |
| 521 | set #myCheckbox's checked to true |
| 522 | ``` |
| 523 | * Fixed the `from:` option in [`hx-trigger`](https://htmx.org/attributes/hx-trigger) to support `closest <CSS selector>` |
| 524 | and `find <CSS selector>` forms |
| 525 | * Don't boost anchor tags with an explicit `target` set |
| 526 | * Don't cancel all events on boosted elements, only the events that naturally trigger them (click for anchors, submit |
| 527 | for forms) |
| 528 | * Persist revealed state in the DOM so that on history navigation, revealed elements are not re-requested |
| 529 | * Process all [`hx-ext`](https://htmx.org/attributes/hx-ext) attributes, even if no other htmx attribute is on the element |
| 530 | * Snapshot the current URL on load so that history support works properly after a page refresh occurs |
| 531 | * Many, many documentation updates (thank you to all the contributors!) |
| 532 | |
| 533 | |
| 534 | ## [1.6.0] - 2021-10-01 |
| 535 | |
| 536 | * Completely reworked `<script>` tag support that now supports the `<script src="...'/>` form |
| 537 | * You can now use the value `unset` to clear a property that would normally be inherited (e.g. hx-confirm) |
| 538 | * The `htmx-added` class is added to new content before a swap and removed after the settle phase, which allows you |
| 539 | more flexibility in writing CSS transitions for added content (rather than relying on the target, as with `htmx-settling`) |
| 540 | * The `htmx:beforeSwap` event has been updated to allow you to [configure swapping](https://htmx.org/docs/#modifying_swapping_behavior_with_events) |
| 541 | behavior |
| 542 | * Improved `<title>` extraction support |
| 543 | * You can listen to events on the `window` object using the `from:` modifier in `hx-trigger` |
| 544 | * The `root` option of the `intersect` event was fixed |
| 545 | * Boosted forms respect the `enctype` declaration |
| 546 | * The `HX-Boosted` header will be sent on requests from boosted elements |
| 547 | * Promises are not returned from the main ajax function unless it is an api call (i.e. `htmx.ajax`) |
| 548 | |
| 549 | ## [1.5.0] - 2021-7-12 |
| 550 | |
| 551 | * Support tracking of button clicked during a form submission |
| 552 | * Conditional polling via the [hx-trigger](https://htmx.org/attributes/hx-trigger) attribute |
| 553 | * `document` is now a valid pseudo-selector on the [hx-trigger](https://htmx.org/attributes/hx-trigger) `from:` argument, allowing you |
| 554 | to listen for events on the document. |
| 555 | * Added the [hx-request](https://htmx.org/attributes/hx-request) attribute, allowing you to configure the following aspects of the request |
| 556 | * `timeout` - the timeout of the request |
| 557 | * `credentials` - if the request will send credentials |
| 558 | * `noHeaders` - strips all headers from the request |
| 559 | * Along with the above attribute, you can configure the default values for each of these via the corresponding `htmx.config` |
| 560 | properties (e.g. `htmx.config.timeout`) |
| 561 | * Both the `scroll` and `show` options on [hx-swap](https://htmx.org/attributes/hx-swap) now support extended syntax for selecting the |
| 562 | element to scroll or to show, including the pseudo-selectors `window:top` and `window:bottom`. |
| 563 | |
| 564 | ## [1.4.1] - 2021-6-1 |
| 565 | |
| 566 | * typo fix |
| 567 | |
| 568 | ## [1.4.0] - 2021-5-25 |
| 569 | |
| 570 | * Added the `queue` option to the [hx-trigger](https://htmx.org/attributes/hx-trigger) attribute, allowing you to specify how events |
| 571 | should be queued when they are received with a request in flight |
| 572 | * The `htmx.config.useTemplateFragments` option was added, allowing you to use HTML template tags for parsing content |
| 573 | from the server. This allows you to use Out of Band content when returning things like table rows, but it is not |
| 574 | IE11 compatible. |
| 575 | * The `defaultSettleDelay` was dropped to 20ms from 100ms |
| 576 | * Introduced a new synthetic event, [intersect](https://htmx.org/docs#pecial-events) that allows you to trigger when an item is scrolled into view |
| 577 | as specified by the `IntersectionObserver` API |
| 578 | * Fixed timing issue that caused exceptions in the `reveal` logic when scrolling at incredible speeds - <https://github.com/bigskysoftware/htmx/issues/463> |
| 579 | * Fixed bug causing SVG titles to be incorrectly used as page title - <https://github.com/bigskysoftware/htmx/issues/459> |
| 580 | * Boosted forms that issue a GET will now push the URL by default - <https://github.com/bigskysoftware/htmx/issues/485> |
| 581 | * Better dispatch of request events when an element is removed from the DOM |
| 582 | * Fixed a bug causing `hx-prompt` to fail |
| 583 | * The `htmx.config.withCredentials` option was added, to send credentials with ajax requests (default is `false`) |
| 584 | * The `throttle` option on `hx-trigger` does not delay the initial request any longer |
| 585 | * The `meta` key is ignored on boosted links |
| 586 | * `<script>` tags are now evaluated in the global scope |
| 587 | * `hx-swap` now supports the `none` option |
| 588 | * Safari text selection bug - <https://github.com/bigskysoftware/htmx/issues/438> |
| 589 | |
| 590 | ## [1.3.3] - 2021-4-5 |
| 591 | |
| 592 | * Added the [`hx-disabled`](https://htmx.org/docs#security) attribute to allow htmx to be turned off for parts of the DOM |
| 593 | * SSE now uses a full-jitter exponential backoff algorithm on reconnection, using the `htmx.config.wsReconnectDelay` |
| 594 | setting |
| 595 | |
| 596 | ## [1.3.2] - 2021-3-9 |
| 597 | |
| 598 | * Bug fixes |
| 599 | |
| 600 | ## [1.3.1] - 2021-3-9 |
| 601 | |
| 602 | * IE11 fixes |
| 603 | |
| 604 | ## [1.3.0] - 2021-3-6 |
| 605 | |
| 606 | * Support a `target` modifier on `hx-trigger` to filter based on the element targeted by an event. This allows |
| 607 | lazy binding to that target selector. |
| 608 | * Events are no longer consumed by the first element that might handle them, unless the `consume` keyword is |
| 609 | added to the `hx-trigger` specification |
| 610 | * Added the `htmx:beforeSend` event, fired just before an ajax request begins |
| 611 | * SSE swaps are properly settled |
| 612 | * Fixed bug that was improperly cancelling all clicks on anchors |
| 613 | * `htmx.ajax()` now returns a promise |
| 614 | |
| 615 | ## [1.2.1] - 2021-2-19 |
| 616 | |
| 617 | * Fixed an issue with the history cache, where the cache was getting blown out after the first navigation backwards |
| 618 | * Added the `htmx.config.refreshOnHistoryMiss` option, allowing users to trigger a full page refresh on history cache miss |
| 619 | rather than issuing an AJAX request |
| 620 | |
| 621 | ## [1.2.0] - 2021-2-13 |
| 622 | |
| 623 | ### New Features |
| 624 | |
| 625 | * `hx-vars` has been deprecated in favor of `hx-vals` |
| 626 | * `hx-vals` now supports a `javascript:` prefix to achieve the behavior that `hx-vars` provided |
| 627 | * The new `hx-headers` attribute allows you to add headers to a request via an attribute. Like `hx-vals` it supports |
| 628 | JSON or javascript via the `javascript:` prefix |
| 629 | * `hx-include` will now include all inputs under an element, even if that element is not a form tag |
| 630 | * The [preload extension](https://htmx.org/extensions/preload/) now offers a `preload-images="true"` attribute that will aggressively load images in preloaded content |
| 631 | * On requests driven by a history cache miss, the new `HX-History-Restore-Request` header is included so that the server |
| 632 | can differentiate between history requests and normal requests |
| 633 | |
| 634 | ### Improvements & Bug fixes |
| 635 | |
| 636 | * Improved handling of precedence of input values to favor the enclosing form (see [here](https://github.com/bigskysoftware/htmx/commit/a10e43d619dc340aa324d37772c06a69a2f47ec9)) |
| 637 | * Moved event filtering logic *after* `preventDefault` so filtering still allows events to be properly handled |
| 638 | * No longer trigger after swap events on elements that have been removed via an `outerHTML` swap |
| 639 | * Properly remove event handlers added to other elements when an element is removed from the DOM |
| 640 | * Handle the `scroll:` modifier in `hx-swap` properly when an `outerHTML` swap occurs |
| 641 | * Lots of docs fixes |
| 642 | |
| 643 | ## [1.1.0] - 2021-1-6 |
| 644 | |
| 645 | * Newly added [preload extension](https://htmx.org/extensions/preload/) allows you to preload resources for lower |
| 646 | latency requests! |
| 647 | * Support the `ignore:` modifier for extensions |
| 648 | * Updated form variable order inclusion to include the enclosing form *last* so that, in the presence of multiple |
| 649 | values, the most relevant value is the most likely to be selected by the server |
| 650 | * Support for the [`htmx.ajax()`](https://dev.htmx.org/api/#ajax) javascript function, to issue an htmx-style ajax |
| 651 | request from javascript |
| 652 | * Removed the following htmx request headers for better cache behavior: `HX-Event-Target`, `HX-Active-Element`, |
| 653 | `HX-Active-Element-Name`, `HX-Active-Element-Value` |
| 654 | * Added the [`hx-preserve`](https://dev.htmx.org/attributes/hx-preserve) attribute, which allows |
| 655 | you to preserve elements across requests (for example, to keep a video element playing properly) |
| 656 | * The [path-deps](https://dev.htmx.org/extensions/path-deps/#refresh) now surfaces a small api |
| 657 | for refreshing path dependencies manually in javascript |
| 658 | * Now support the `from:` clause on [`hx-trigger`](https://dev.htmx.org/attributes/hx-trigger) to |
| 659 | allow an element to respond to events on other elements. |
| 660 | * Added the `htmx:beforeProcessNode` event, renamed the (previously undocumented) `htmx:processedNode` to `htmx:afterProcessNode` |
| 661 | * Added `closest` syntax support for the [`hx-indicator`](https://dev.htmx.org/attributes/hx-indicator) attribute |
| 662 | * Added `on load` support for the newest version of [hyperscript](https://hyperscript.org) |
| 663 | * Added the `htmx.config.allowEval` configuration value, for CSP compatibility |
| 664 | * Bug fixes & improvements |
| 665 | |
| 666 | ## [1.0.2] - 2020-12-12 |
| 667 | |
| 668 | * Extend all API methods to take a string selector as well as an element |
| 669 | * Out of band swap elements need not be top level now |
| 670 | * [`hx-swap-oob`](https://htmx.org/attributes/hx-swap-oob) now can accept a CSS selector to retarget with |
| 671 | |
| 672 | ## [1.0.1] - 2020-12-04 |
| 673 | |
| 674 | * AJAX file upload now correctly fires events, allowing for [a proper progress bar](https://htmx.org/patterns/file-upload) |
| 675 | * htmx api functions that expect an element now can accept a string selector instead: |
| 676 | ```js |
| 677 | htmx.on('#form', 'htmx:xhr:progress', function(evt) { |
| 678 | htmx.find('#progress').setAttribute('value', evt.detail.loaded/evt.detail.total * 100) |
| 679 | }); |
| 680 | ``` |
| 681 | * htmx now properly handles the `multiple` attribute on `<select>` elements |
| 682 | |
| 683 | ## [1.0.0] - 2020-11-24 |
| 684 | |
| 685 | * Bumped the release version :) |
| 686 | |
| 687 | ## [0.4.1] - 2020-11-23 |
| 688 | |
| 689 | * Fixed bug with title tag support when title tag contained HTML entities |
| 690 | * Pass properties for the `loadstart`, `loadend`, `progress`, `abort` events through properly to the htmx equivalents |
| 691 | |
| 692 | ## [0.4.0] - 2020-11-16 |
| 693 | |
| 694 | * Now support the `HX-Redirect` and `HX-Refresh` response headers for redirecting client side and triggering a page refresh, respectively |
| 695 | * `hx-vars` now overrides input values |
| 696 | * `<title>` tags in responses will be used to update page titles |
| 697 | * All uses of `eval()` have been removed in favor of `Function` |
| 698 | * [`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. |
| 699 | |
| 700 | ## [0.3.0] - 2020-10-27 |
| 701 | |
| 702 | * `hx-trigger` parsing has been rewritten and now supports [trigger filters](https://htmx.org/docs/#trigger-filters) to filter |
| 703 | events based on arbitrary javascript expressions |
| 704 | * htmx now supports two additional response headers `HX-Trigger-After-Swap` and `HX-Trigger-After-Settle` allowing |
| 705 | an event to be triggered after a given life cycle event (instead of before the swap) |
| 706 | * The `requestConfig` is now passed out to events surrounding the AJAX life cycle |
| 707 | * htmx now evaluates `<script>` tags as javascript when no language is defined on them |
| 708 | * A new [`event-header`](https://htmx.org/extensions/event-header) extension, which will include a serialized JSON representation of the triggering event in requests |
| 709 | |
| 710 | ## [0.2.0] - 2020-9-30 |
| 711 | |
| 712 | * AJAX file upload [support](https://htmx.org/docs#files) |
| 713 | * The HTML validation API is [respected](https://htmx.org/docs#validation) |
| 714 | |
| 715 | ## [0.1.0] - 2020-9-18 |
| 716 | |
| 717 | * *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'` |
| 718 | * 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, |
| 719 | with the new `swap:<event name>` syntax. |
| 720 | * [`hx-target`](https://htmx.org/attributes/hx-target) now supports a `find` syntax to find elements below the element by a CSS selector |
| 721 | * htmx plays better with deferred loading and many package managers |
| 722 | * 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 |
| 723 | `htmx:after-on-load`) |
| 724 | * [hypeerscript](https://hyperscript.org) is now initialized independently of htmx |
| 725 | |
| 726 | ## [0.0.8] - 2020-7-8 |
| 727 | |
| 728 | * The `view` modifier on `hx-swap` has been renamed to `show`: `hx-swap='innerHTML show:top'` |
| 729 | |
| 730 | ## [0.0.7] - 2020-6-30 |
| 731 | |
| 732 | * The [`hx-swap`](https://htmx.org/attributes/hx-swap) attribute now supports two new modifiers: |
| 733 | * `scroll` - allows you to scroll the target to the `top` or `bottom` |
| 734 | * `view` - allows you to scroll the `top` or `bottom` of the target into view |
| 735 | * 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` |
| 736 | * 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 |
| 737 | |
| 738 | ## [0.0.6] - 2020-6-20 |
| 739 | |
| 740 | * Custom request/response headers no longer start with the `X-` prefix, which is no longer recommended |
| 741 | * empty verb attributes are now allowed and follow the anchor tag semantics (e.g. `<div hx-get></div>`) |
| 742 | * nunjuks inline rendering is now supported in the `client-side-templates` extension |
| 743 | * the new `ajax-header` extension includes the `X-Requested-With` header |
| 744 | * bad JSON is now handled more gracefully |
| 745 | * `hx-swap="none"` will cause no swap to take place <https://github.com/bigskysoftware/htmx/issues/89> |
| 746 | * `hx-trigger` now supports a `throttle` modifier <https://github.com/bigskysoftware/htmx/issues/88> |
| 747 | * the focused element is preserved if possible after a replacement |
| 748 | * perf improvements for large DOM trees with sparse `hx-` annotations |
| 749 | |
| 750 | ## [0.0.4] - 2020-5-24 |
| 751 | |
| 752 | * Extension mechanism added |
| 753 | * SSE support added |
| 754 | * WebSocket support added |
| 755 | |
| 756 | ## [0.0.3] - 2020-5-17 |
| 757 | |
| 758 | * Renamed to htmx |
| 759 | * A bug fix for the `hx-prompt` attribute |
| 760 | * A bug fix for multiple `hx-swap-oob` attributes |
| 761 | * Moved the default CSS indicator injection into its own sheet to avoid breaking |
| 762 | * Added the `htmx.config.includeIndicatorStyles` configuration option so people can opt out of injecting the indicator CSS |
| 763 | |
| 764 | |
| 765 | ## [0.0.1] - 2020-5-15 |
| 766 | |
| 767 | * Initial release (originally named kutty) |