3225 Commits

Author SHA1 Message Date
Vincent
82546dbd47
Inherit list-keyword in hx-include / hx-indicator (#1766)
Inherit keyword in hx-include / hx-indicator
2025-06-02 11:20:24 -06:00
Jeremiah Johnson
4184d1fd0c
fix(swap): apply swap delay in swap function instead of handleAjaxResponse (#2845)
* fix(swap): apply swap delay in swap function instead of handleAjaxResponse

* add swap delay test
2025-06-02 11:19:11 -06:00
Oliver Haas
6d238f3d61
Feat/hx reselect support unset (#3153)
feat: handle 'unset'for HX-Reselect in swap function (+ test)
2025-06-02 11:01:20 -06:00
Simon Hartley
075ed73799
Fix target value in htmx:targetError when inheritance has been used (#3178)
Co-authored-by: scrhartley <scrhartley@github.com>
2025-06-02 10:58:31 -06:00
JacobMonticello
e4ecc55586
Typo in addEventListener - use evt instead of event (#3188)
Use evt instead of event

Co-authored-by: Jacob monticello <Jacob Monticello>
2025-06-02 10:57:46 -06:00
Gustavo Guzmán
11a8e9c6c2
Feature: add extensionsToIgnore to withExtensions (#3195)
feat: add extensionsToIgnore to withExtensions
2025-06-02 10:56:51 -06:00
David Martiník
730bd8224d
Fixes issue 1537 - OOB does not escape query selector - updated version (#3304)
* Fixes issue 1537 - OOB does not escape query selector

* Adds test cases for oob swaps where the id contains special characters

* Updated oob multiple elements with the same ID test

* fix(issue-1537): resolved conflicts with master

* fix(issue-1537): fixed codestyle issues

---------

Co-authored-by: Fraser Chapman <fraser.chapman@gmail.com>
Co-authored-by: David Martiník <david.martinik@powerflow.cz>
2025-06-02 10:52:29 -06:00
Simon Hartley
8409ebca3b
Fix missing TypeScript property (#3315)
Add hidden elt property to HtmxRequestConfig

Co-authored-by: scrhartley <scrhartley@github.com>
2025-06-02 10:50:51 -06:00
MichaelWest22
083dbcdd6f
update web test-runner and remove temp summaryReporter workaournd (#3320)
* update web test-runner and remove temp summaryReporter workaournd

* Update error reporting to show in context of the test file and as a summary at the bottom
2025-05-22 07:17:16 +02:00
Simon Hartley
d2e39716fb
Fix type for event parameter (#3317)
Fix type of event for HtmxExtension.onEvent

Co-authored-by: scrhartley <scrhartley@github.com>
2025-05-19 07:40:36 +02:00
Simon Hartley
ff190eef26
Add substr lint (#3295)
Co-authored-by: scrhartley <scrhartley@github.com>
2025-04-28 07:15:03 +02:00
Simon Hartley
53496ff428
Fix typo (#3294)
Co-authored-by: scrhartley <scrhartley@github.com>
2025-04-28 07:12:33 +02:00
MichaelWest22
5520566fc3
Add historyRestoreAsHxRequest config to optionally disable hx-request header from history restore requests (#3278)
* Added Config to optionally disable the breaking HX-Request change made recently

* fix broken resolved conflict
2025-04-24 14:21:23 -06:00
Simon Hartley
db8e5e03cb
Fix event not being available in hx-vals/hx-vars when hx-trigger has delay (#3196)
Fix event not being available in hx-vals/hx-vars when hx-trigger uses delay

Co-authored-by: scrhartley <scrhartley@github.com>
2025-04-24 13:58:31 -06:00
Emil Hemdal
e01027b938
Write title as innerText instead of innerHTML (#3173)
* Change innerHTML to innerText for title element

Some security checks are grumpy when using innerHTML. Using innerText
instead calms them.

Signed-off-by: Emil Hemdal <emil@hemdal.se>

* Add Type Hints/Cast

* Change to textContent instead of innerText

Also remove type hinting/casting since it is no longer needed

Signed-off-by: Emil Hemdal <emil@hemdal.se>

---------

Signed-off-by: Emil Hemdal <emil@hemdal.se>
2025-04-24 13:57:34 -06:00
Simon Hartley
6a585f9f3c
Get rid of latest usages of substr (#3074)
* Replace latest usages of substr

* Replace usage of substr in tests

---------

Co-authored-by: scrhartley <scrhartley@github.com>
2025-04-24 13:56:55 -06:00
MichaelWest22
05d37e6ea6
Remove old IE support (#3277)
* Remove old IE support

* don't need regex in normalizePath

* fix verifyPath to handle about: situations like some iframes now that there is no fallback

* improve diff

* fix logic mistake in last diff improvment

* Update url normlization test post testing upgrade

* remove un-needed document
2025-04-24 13:56:05 -06:00
MichaelWest22
d3bcd787ba
proxy window.location for testing and extension overrides (#3283)
* proxy window.location for testing and extension overrides

* when not whe in test name
2025-04-24 13:55:27 -06:00
MichaelWest22
408850a08e
Additional Code Coverage (#3282)
* Improve loc coverage by removing dead paths caused by bad type checks and add some tests for other paths

* removed exception for https://github.com/microsoft/playwright/issues/5894 that was fixed in 2022 with webkit 16.0
2025-04-24 13:54:43 -06:00
MichaelWest22
21dc121fce
handle removing request lock on errors (#3284)
* handle removing request lock on errors

* Fixed non function verifyUrl tests and added tests for the double requests this PR fixes
2025-04-24 13:53:14 -06:00
MichaelWest22
24a0106f76
Update testing framework to web-test-runner and improve code coverage (#3273)
* Fix old npm dependencies

* implement web-test-runner tests for headless alongside Mocha browser tests

* Increase test and code coverage

* update to 100% coverage and impove eslint

* Update testing Doco

* revert all htmx changes and updates/disable tests needed

* fix browser mocha test

* Default testing to use playwrite only instead of puppeter

* playwright install fix

* Imporve test summary reporting

* flatten false looks closer to original
2025-04-17 17:55:43 -06:00
Sebastian Davids
1d1a3ceeee
Fix JSDoc of getRespCodeTarget (#3235)
Signed-off-by: Sebastian Davids <sdavids@gmx.de>
2025-03-17 08:06:06 +01:00
Geoffrey B. Eisenbarth
9fcb5c5c32
Enforce no-op on submit buttons with formmethod=dialog. (#3075)
* Enforce no-op on submit buttons with formmethod=dialog.

* Properly resolve referenced forms. (#3094)

* Properly resolve referenced forms.

* Clarify variable.

* Cast elt to avoid TS exceptions.

* Refactor for JSDoc.

* Clarify shouldCancel.

* Remove complicated JSDoc in favor of ts-ignore.

* More coverage for button scenarios.

* Use properties instead of matching.

* Mention reset button change.

* Mention formmethod=dialog change.
2025-01-09 15:22:36 -07:00
Geoffrey B. Eisenbarth
f46989b24a
Properly resolve referenced forms. (#3094)
* Properly resolve referenced forms.

* Clarify variable.

* Cast elt to avoid TS exceptions.

* Refactor for JSDoc.

* Clarify shouldCancel.

* Remove complicated JSDoc in favor of ts-ignore.

* More coverage for button scenarios.

* Use properties instead of matching.

* Mention reset button change.
2025-01-09 11:23:32 -07:00
Carson Gross
db42b46218 2.0.4 release notes 2024-12-12 14:34:08 -07:00
Carson Gross
233bf01a4b 2.0.4 release notes 2024-12-12 14:33:31 -07:00
Carson Gross
1a80c283f5 2.0.4 release notes 2024-12-12 13:25:36 -07:00
Carson Gross
52db21955e prep next release 2024-12-12 13:13:37 -07:00
Carson Gross
fb78106dc6 prep next release 2024-12-12 13:12:49 -07:00
Geoffrey B. Eisenbarth
cc2466b1f8
Cancel vanilla submits from <button[form]/>. (#3072) 2024-12-12 13:09:26 -07:00
Vincent
a331244923
Support multiple extended selectors for hx-include, hx-trigger from, and hx-disabled-elt (#2902)
* Initial suggestion (squashed)

Support multiple extended selectors for hx-include

Additional test for nested standard selector

Add @MichaelWest22 hx-disabled-elt multiple selector test

Add hx-trigger `from` test with multiple extended selectors

Simplify

Include #2915 fix

Update htmx.js

Split for readability

Don't apply global to previous selectors

Rewrite loop, restore global recursive call, minimize diff

Use break for better readability

Co-Authored-By: MichaelWest22 <12867972+MichaelWest22@users.noreply.github.com>

* Keep global as a first-position-only keyword

* Wrapped selector syntax

* Replace substring check by individual chars check

* Fix format

---------

Co-authored-by: MichaelWest22 <12867972+MichaelWest22@users.noreply.github.com>
2024-12-12 11:12:01 -07:00
Carson Gross
232667d2c6 fix https://github.com/bigskysoftware/htmx/issues/1788
boosted forms that issue a `GET` (and only a `GET`) and have no `action` attribute or an empty `action` attribute should clear the existing parameters of the current path when submitting lmao
2024-12-11 16:42:20 -07:00
Carson Gross
815c117088 comment out test that is breaking suite in browser 2024-12-11 15:06:03 -07:00
Carson Gross
e171bca9e7 Merge branch 'master' into dev 2024-12-11 14:59:27 -07:00
Simon Hartley
704dac7a7f
Replace deprecated String.prototype.substr usage (#2951)
Co-authored-by: shartley <scrhartley@github.com>
2024-12-11 14:28:09 -07:00
basvk
34dda10f9e
Do not execute hx-trigger="load" on re-initialization of an existing node (#2976)
* Do not execute hx-trigger="load" on re-initialization of an existing node

* simplify initNode firstInit logic
2024-12-11 14:27:34 -07:00
Alexander Petros
bd35f64cf7
Add missing htmx:trigger event on load triggers (#3033) 2024-12-11 14:20:12 -07:00
Alexander Petros
5ab508f652
Make bodyContains return true for nested shadow roots (#3034)
This fixes an issues in which `bodyContains()` would incorrectly return
false for nested shadow roots.
2024-12-11 14:17:32 -07:00
MichaelWest22
c24fb71a10
Handle Invalid template content (#3064) 2024-12-11 14:16:20 -07:00
Carson Gross
2e59a14213 follower24 sponsorship 2024-12-07 20:25:46 -07:00
Carson Gross
45f9c7aa4a prefer if statements to polymorphism 2024-12-07 20:18:47 -07:00
Carson Gross
f946dbd876 new sponsors 2024-12-05 13:18:27 -07:00
Carson Gross
2b88d967c1 design update 2024-12-03 07:25:05 -07:00
Carson Gross
68ef5c51e2 Merge remote-tracking branch 'origin/master' 2024-12-02 11:06:21 -07:00
Carson Gross
c9b8f0a211 add a modest critique 2024-12-02 11:06:12 -07:00
Ryan Kilpadi
445fddeb28
[Documentation] Update location of ws/sse demo server (#3052) 2024-11-30 10:30:53 +01:00
Ryan Kilpadi
ffbcd9291c
[Documentation] Fix outdated attribute links (#3051) 2024-11-30 10:27:47 +01:00
Carson Gross
24fb2fe522 essay fix 2024-11-25 05:00:59 -07:00
Carson Gross
bd2150aaaf Merge remote-tracking branch 'origin/master' 2024-11-25 04:48:51 -07:00
Carson Gross
8ff3b3d186 essay fix 2024-11-25 04:48:30 -07:00