What's Changed
- fix select and strip and title handling by @MichaelWest22 in #3492
- [4] Bind window context for Firefox compatibility by @tristandruyen in #3486
- Attribute value only return string again by @MichaelWest22 in #3493
- Update index page with correct link to
jsdelivrby @szuliq in #3490 - etag support by @1cg in #3498
- Pimp out the website for htmx 4.0 by @scriptogre in #3499
- optimize oob and fix partial tests by @MichaelWest22 in #3500
- Ext doco by @MichaelWest22 in #3502
- Allow any extension to be regisgtered unless you allow list via meta tag by @MichaelWest22 in #3503
- fix bug in hx-config setting wrong level for + merge by @MichaelWest22 in #3508
- fix up handle swap extension point and doco by @MichaelWest22 in #3505
- replace state on initial state load by @MichaelWest22 in #3506
- Fix title not decoded on boost ("</> htmx" instead of "</> htmx") by @scriptogre in #3507
- website fixes by @scriptogre in #3504
- update "Patterns" page by @scriptogre in #3510
- [4] Small docs fix for by @tristandruyen in #3509
- update /patterns & /help page by @scriptogre in #3513
- move tokenizer to parseConfig for all the things by @MichaelWest22 in #3516
- Remove find ext tokenizer by @MichaelWest22 in #3518
- generalize hx-status and fix ajax issues by @MichaelWest22 in #3528
- add hx-confirm htmx:confirm event with async issueRequest by @MichaelWest22 in #3532
- handle inputs for web components that are form associated by @MichaelWest22 in #3523
- Implement hx-custom template tag support by @MichaelWest22 in #3537
- move to registerExtension to avoid extension upgrade confusion by @MichaelWest22 in #3546
- handle duplicates in action query params and form data by @MichaelWest22 in #3543
- Websocket extension for HTMX by @stukennedy in #3547
- add hx-target hx-source and hx-request-type headers by @MichaelWest22 in #3548
- allow string swapSpecs in insertContent by @MichaelWest22 in #3551
- add findall and fix find by @MichaelWest22 in #3555
- Fix closing tags for hx-partial in htmx-4.md by @benopotamus in #3557
- [docs] Remove redundant migration note by @benopotamus in #3559
- [docs] Fix typos in documentation by @benopotamus in #3558
- implement advanced hx-boost overrides by @MichaelWest22 in #3549
- Add mergeConfig support and remove + hx-config merging by @MichaelWest22 in #3561
- fix bug with empty response after partial removal detection by @MichaelWest22 in #3569
- fix missing target/swap via envelope and fix re-connection tests by @MichaelWest22 in #3571
- fix hx-validate to respect noValidate and validate inputs outside of … by @MichaelWest22 in #3562
- improve hx-boost advanced config to use new mergeConfig for nesting by @MichaelWest22 in #3572
- Morph skip support for web components by @MichaelWest22 in #3573
- handle transition overrides on oob/partial by @MichaelWest22 in #3570
- improve parseConfig and append to allow joining json for hx-vals by @MichaelWest22 in #3577
- handle returning this from findAllExt for any inheritance level by @MichaelWest22 in #3579
- bug morph cleanup of textNodes should work by @MichaelWest22 in #3584
- Add Morhing documentation by @MichaelWest22 in #3582
- optimize hx-vals and headers async with a callback and fix ws async by @MichaelWest22 in #3581
- add textContent swap style by @MichaelWest22 in #3593
- WebSocket Extension (hx-ws) Improvements by @stukennedy in #3592
- Improve moprh exact node matching with scan ahead by @MichaelWest22 in #3591
- handle no id found with hx-preserve by @MichaelWest22 in #3610
- Push response url by @MichaelWest22 in #3608
- Handle newContent properly in insertContent by @MichaelWest22 in #3607
- Upsert swap extension by @MichaelWest22 in #3595
- fix document fragment parsing of full page responses for live script support by @MichaelWest22 in #3629
- Trims only the first leading space in a SSE field value (#3588) by @antonlorani in #3589
- Add script tag processing in swapWithHtmx function by @stukennedy in #3636
- Add tests for WebSocket script tag processing by @stukennedy in #3637
- Fix morph error with empty id attributes by @scriptogre in #3639
- Update ws extension to use htmx.swap by @MichaelWest22 in #3638
- Fix iOS Safari SSE disconnect on background (#3634) by @scriptogre in #3640
- feat(ws): handle non-JSON messages as raw HTML with cancelable event by @stukennedy in #3641
- fix firefox not handling script tags in templates by @MichaelWest22 in #3650
- Improve Morph matching by @MichaelWest22 in #3647
- Add focus resoration support by @MichaelWest22 in #3645
- Alpine compatibility extension by @MichaelWest22 in #3654
- fix history restore to always use innerHTML by @MichaelWest22 in #3655
- partials should fall back to use transition default by @MichaelWest22 in #3656
- handle empty non get actions by @MichaelWest22 in #3661
- Extract SSE from core into standalone extension by @scriptogre in #3666
- handle newContent processing of outerMorph that inserts new nodes by @MichaelWest22 in #3667
- async head support by @MichaelWest22 in #3686
- fix up several test issues and bugs by @MichaelWest22 in #3687
- keep indicators on redirect-refresh by @MichaelWest22 in #3688
- support ctx.vals for extension use by @MichaelWest22 in #3689
- update and remove extra npm modules by @MichaelWest22 in #3690
- Document SSE pauseOnBackground behavior and Last-Event-ID resumption by @scriptogre in #3681
- handle zero timeout properly by @MichaelWest22 in #3692
- fix: normalize onLoad event name with metaCharacter by @dienhoa in #3695
- Streamline history event names by @scriptogre in #3700
- alpine-compat ext defer mutation count needs to handle htmx.swap usage by @MichaelWest22 in #3701
- support multiple targets via selectors in oob/partial by @MichaelWest22 in #3691
- Rebuild documentation website with Astro by @scriptogre in #3703
- Bug fix for pantry moveBefore and morph scripts issue by @MichaelWest22 in #3705
- fix several website issue by @MichaelWest22 in #3707
- restore hx-on:: shorthand from htmx 2 by @scriptogre in #3711
- Align WS and SSE extension APIs by @scriptogre in #3717
- preserve json types in ws hx-vals handling by @MichaelWest22 in #3718
- add hx-history-cache extension by @MichaelWest22 in #3698
- Fix upsert so it processes the matched node by @MichaelWest22 in #3727
- fix show:none and show/scroll target documentation by @MichaelWest22 in #3723
- add back stream accept header on all sse enabled requests by @MichaelWest22 in #3733
- handle comma in triggerSpec parsing by @MichaelWest22 in #3738
- fix extension packaging by removing exports rule by @MichaelWest22 in #3737
- add editor support docs section and team page entry by @andreahlert in #3720
- add note about preload attribute name change in migration guide by @nektro in #3734
- simplify outerHTML target fallback by @MichaelWest22 in #3739
- handle disabling hx-location push better so you can use replace easier. by @MichaelWest22 in #3740
- tidy up package by @MichaelWest22 in #3747
- Add auto detection and header based triggering to hx-download extension by @MichaelWest22 in #3756
- Add support for multiple prefix by @MichaelWest22 in #3744
- update header documentation for retarget-reswap-reselect by @MichaelWest22 in #3759
- Typo: explicity should be explicit by @mousedownmike in #3750
- Move to constructable indicator CSS style by @MichaelWest22 in #3766
- rework prefix changes for performance by @MichaelWest22 in #3767
- Add back hx-history-elt and improve history cache extension by @MichaelWest22 in #3773
- alpine history restore state without errors by @MichaelWest22 in #3774
- Add hx-nonce security extension with nonce, safe eval and trusted types support by @MichaelWest22 in #3777
- outerSync swap style option for cleaner body history replacment by @MichaelWest22 in #3778
- Website updates by @scriptogre in #3786
- optimize and minimize hx-on code by @MichaelWest22 in #3783
- restrict fetch mode changes from hx-config by @MichaelWest22 in #3788
- encode unicode id by @MichaelWest22 in #3784
- Update hx-boost attribute syntax in documentation by @Lanayx in #3780
- rename extension to hx-csp by @MichaelWest22 in #3794
- Fix reading attributeValue with custom metaCharacter by @dienhoa in #3795
- Improve Non form input and checkbox handling by @MichaelWest22 in #3797
- handle ws early load events by waiting for connection to open by @MichaelWest22 in #3806
- Fix: outerSync does not re-process correct body on browser history restore by @MichaelWest22 in #3808
- unify hx-on and hx-trigger modifier grammar2 by @MichaelWest22 in #3805
- handle outerSync re-processing of the target element by @MichaelWest22 in #3809
- hx-live: declarative bindings + reactive engine by @scriptogre in #3814
- improve hx-csp nonce gating on all internal eval calls to cover extension use by @MichaelWest22 in #3811
- switch /docs to single-page by @scriptogre in #3818
- Fix website example in /essays/view-transitions/ by @scriptogre in #3829
- add
hx-promptextension to restore htmx 2 attribute by @scriptogre in #3828 - Fix hx-live take to default to sibling scope by @MichaelWest22 in #3816
- update hx-live to use xpath and handle alpine conflict by @MichaelWest22 in #3820
- support json parsing to hx-live data proxy by @MichaelWest22 in #3822
- docs: fix bulk actions example by @ilkiri23 in #3823
- add ctx context to hx-confirm, hx-vals and hx-headers by @MichaelWest22 in #3832
- Improve text node morphing for firefox support by @MichaelWest22 in #3836
- update optimistic extension to support live content by @MichaelWest22 in #3824
- make hx-preload use passive event listeners to avoid touchstart warnings by @MichaelWest22 in #3848
- Allow click modifers to pass though only on links by @MichaelWest22 in #3855
- Fix hx-prompt Unicode header encoding by @cyphercodes in #3846
- cleanup htmx attributes for reinit during morph by @MichaelWest22 in #3834
- Fix 'proto' literal mangled to '#proto#' by build sed by @scriptogre in #3858
- Formalize HCON parsing and comma-aware splitting by @scriptogre in #3859
- Do not boost download links by @scriptogre in #3866
- make hx-encode fall back to form enctype by @MichaelWest22 in #3865
- add morph skip default configs by @MichaelWest22 in #3864
- add empty swap handling override and make sse default to not swap empty responses by @MichaelWest22 in #3862
- improve morph preservation with focused buttons by @MichaelWest22 in #3868
- Fix browser-indicator clobbering history state on boosted nav by @MichaelWest22 in #3861
- Expose HCON to extensions by @scriptogre in #3879
- Fix rename htmx:afterSettle event reference by @holtkamp in #3876
- Guard show target scroll method by @scriptogre in #3880
- Forward
protocolsto WebSocket constructor in hx-ws extension by @scriptogre in #3874 - Rename
htmx:swap:finallytohtmx:finally:swapby @scriptogre in #3873 - Update CI workflow, add web-types validation by @scriptogre in #3875
- handle processing morph placeholder nodes by @MichaelWest22 in #3884
- Unify method/action resolution and improve hx-action doco by @MichaelWest22 in #3883
- handle custom element manual input value collection by @MichaelWest22 in #3872
- Document htmx event response headers type by @yawaramin in #3890
- cache compiled eval tags in safeEval feature for better hx-live perf by @MichaelWest22 in #3888
- handle trusted type polices in optimistic extension using cloneNode by @MichaelWest22 in #3887
- Fix upgrade-check false positive for hx-history-elt by @marciomazza in #3889
- Allow custom methods like query by @MichaelWest22 in #3892
- improve hx-live perf by skipping no change updates by @MichaelWest22 in #3891
- Fix/hx-live test unawaited promise by @marciomazza in #3902
- fix websocket close event code to 1000 from server only 1001 code by @MichaelWest22 in #3908
- Handle history scroll restoration using navigation api except for firefox by @MichaelWest22 in #3905
- move hx-trigger response header timing to after swap by @MichaelWest22 in #3900
- add history cache to htmax but make it opt in via config by @MichaelWest22 in #3898
- Add multipart resume cursors by @scriptogre in #3915
- Fix hx-sse last event ID handling by @scriptogre in #3914
- Publish multipart resume on four by @scriptogre in #3916
- Merge four into four-dev by @scriptogre in #3917
- Add Dien Hoa to the team page by @dienhoa in #3927
- Respect disabled history during swaps by @scriptogre in #3913
- Improve view transitions extension point by @MichaelWest22 in #3918
- Restore form state before deferred head scripts by @scriptogre in #3912
- trigger hx-trigger on new element instead of document by @MichaelWest22 in #3925
- handle sse close with no event data by @MichaelWest22 in #3923
- Fix
hx-liveform reset state by @scriptogre in #3933 - Fix overlapping
hx-livestyles by @scriptogre in #3934 - Fix hx-sse reader-cancel race that produces an unhandled rejection by @marciomazza in #3935
- Warn when
hx-liveexpressions take over16msby @scriptogre in #3932 - Accept intervals for
hx-liveinput debounce by @scriptogre in #3930 - Standardize
hx-sseevents, config, and legacy support by @scriptogre in #3929 - support extended css selectors in hx-partial by @MichaelWest22 in #3924
- Allows hx-live to cache JS eval functions by @MichaelWest22 in #3919
- Fix stray NBSP indentation in src/htmx.js by @marciomazza in #3943
- add scanning for non ascii characters in js src files by @MichaelWest22 in #3950
- allow abort event on htmx.ajax requests by @MichaelWest22 in #3944
- move to allowEmptySwapAfterOOB config instead of defaultSwapEmpty by @MichaelWest22 in #3942
- expose initialize function for async and streaming use cases by @MichaelWest22 in #3953
- Namespace
hx-headlifecycle events by @scriptogre in #3938 - Rename
htmx.ajax()context to options by @scriptogre in #3940 - Fix
HX-Locationreplace option by @scriptogre in #3939 - Separate request scheduling from request execution by @scriptogre in #3941
- rename hx-optimistic to hx-pending by @MichaelWest22 in #3958
- get to 100% code coverage by @MichaelWest22 in #3945
- add hx-query to support the new RFC method by @MichaelWest22 in #3962
- Add
connectiontohx-sseandhx-multipartevent details by @scriptogre in #3960 - Align
hx-sseevents withhx-multipart&hx-wsby @scriptogre in #3961 - (WIP) Redesign hx-live with a unified DOM state API by @scriptogre in #3957
- handle vary caching for nonced responses for hx-csp by @MichaelWest22 in #3967
- Streaming response pattern, and hold the request open while an extension consumes it by @1cg in #3970
- fix(v4): append array items individually in __addInputValues for FormData by @AndrewGit25 in #3965
- Improve
hx-wsmessages and reconnects by @scriptogre in #3910 - handle request abort on cleanup in sse extension by @MichaelWest22 in #3975
- Add reset trigger and swap modifiers to reset the closest form by @MichaelWest22 in #3977
- add config for sse.releaseOn:end to allow control of when requests unblock by @MichaelWest22 in #3980
- Fix: outerHTML swap with body fragment corrupts non-body targets by @MichaelWest22 in #3983
- morph preserves input value on active element by @MichaelWest22 in #3985
New Contributors
- @tristandruyen made their first contribution in #3486
- @szuliq made their first contribution in #3490
- @stukennedy made their first contribution in #3547
- @benopotamus made their first contribution in #3557
- @antonlorani made their first contribution in #3589
- @dienhoa made their first contribution in #3695
- @andreahlert made their first contribution in #3720
- @Lanayx made their first contribution in #3780
- @ilkiri23 made their first contribution in #3823
- @cyphercodes made their first contribution in #3846
- @holtkamp made their first contribution in #3876
- @AndrewGit25 made their first contribution in #3965
Full Changelog: v2.0.8...v4.0.0