MichaelWest22
958fef20d9
Add shadowRoot host selector ( #2866 )
2024-10-02 19:46:11 -06:00
Eric Kwoka
b23b2f034e
🐛 Prevents erroring on null vals ( #2799 )
...
* 🐛 Prevents erroring on null vals
* 🚧 Applies same fix in FormProxy
* 🧪 Adds Test for null in FormDataProxy
2024-10-02 19:21:02 -06:00
MichaelWest22
b98e4f2b12
fix htmx.ajax defaulting to swap body when target not found ( #2878 )
...
* ajax helper handle no target
* allow source only targeting
* Add tests
* Handle source set but invalid target set
* Improve source logic
* missed #
* improve readiblity and add inline comment
2024-10-02 19:18:22 -06:00
Jackie Li
4916ce4d02
fix #2932 : check parent is null for swap delete ( #2933 )
...
* fix #2932 : check parent is null for swap
* fix test in swap when parent elt deleted
2024-10-02 19:08:39 -06:00
Vincent
326ff3b296
Fix focusin-based tests ( #2861 )
2024-09-01 14:22:04 -04:00
Carson Gross
2855c2c24e
merge https://github.com/bigskysoftware/htmx/pull/2723
2024-08-29 12:00:00 -06:00
Ben Croker
cd6cdb275e
Ability to add options
argument to event listener ( #2836 )
...
* Update htmx.js
* Update events.js
* Add fallback value
* Use JSDoc syntax
* Document parameter
* Only accept an object
* Revert change
* Add useCapture
* Update htmx.js
* Add `useCapture` test
* Clean up
* Revert addition of test
2024-08-29 10:36:24 -06:00
ehenighan
27fc37ce50
Issue #2676 - Tests for v2 to prevent regression of issue from v1 ( #2829 )
...
* Tests for v2 to prevent regression of issue from v1
* Linting
---------
Co-authored-by: Ed Henighan <ed.henighan@adi-uk.com>
2024-08-19 21:09:42 +02:00
Vincent
941e94fb98
Fix file upload through htmx.ajax ( #2778 )
...
* Fix File values handling in formDataFromObject
Fixes #2630
* Test file input upload + htmx.ajax file upload
2024-08-05 13:38:21 -06:00
Carson Gross
89dc9bea2e
Merge remote-tracking branch 'origin/dev' into dev
2024-08-05 13:12:22 -06:00
Carson Gross
0ace4a731c
scan through all siblings (not just until the first non-element) when doing an outerHTML swap to add things to settle
...
fixes https://github.com/bigskysoftware/htmx/issues/2787
2024-08-05 13:12:13 -06:00
Ben Croker
a44a1b3c34
Add ability to trigger an event on another element using HX-Trigger
response header ( #2768 )
...
* Update htmx.js
* Update htmx.js
* Update headers.js
* Update htmx.js
* Update htmx.js
* Update htmx.js
* Update hx-trigger.md
2024-07-29 10:33:24 -06:00
Vincent
bec3657a81
Fix: values order with non-GET requests ( #2749 )
...
Fix values order with non-GET requests #2703
2024-07-26 00:22:59 -04:00
Carson Gross
8928efc40a
restore tests and dynamic hx-on behavior
2024-05-16 14:16:43 -06:00
Carson Gross
20b42aaf88
Merge branch 'master' into dev
...
# Conflicts:
# src/htmx.d.ts
# src/htmx.js
# test/core/security.js
# www/content/docs.md
2024-05-16 12:50:13 -06:00
Carson Gross
b991f20c3a
make hx-on respect the hx-disable attribute
2024-04-25 09:49:50 -06:00
Carson Gross
2be7054525
lint
2024-04-17 05:45:40 -06:00
Carson Gross
01cb5e0d8d
support hx-on in shadowroot
2024-04-17 05:25:28 -06:00
Carson Gross
cd4e6c62cf
clean up bad IE references
2024-03-24 14:39:19 -06:00
Carson Gross
d92f165923
lint
2024-03-21 17:35:17 -06:00
Carson Gross
038e1a78f0
Merge branch 'v2.0v2.0' into dev
...
# Conflicts:
# dist/htmx.js
# dist/htmx.min.js
# dist/htmx.min.js.gz
# src/htmx.js
# test/core/ajax.js
# test/core/regressions.js
# www/static/src/htmx.js
# www/themes/htmx-theme/static/js/htmx.js
2024-03-21 17:28:09 -06:00
Vincent
e64238dba3
Fix IE11 incompatibilities ( #2408 )
2024-03-21 16:06:44 -06:00
Carson Gross
ef791c51eb
fix double script execution issue when using template parsing
2024-03-13 18:11:58 -06:00
Vincent
e780175736
Double script exec tests variants using templates: issue confirmed ( #2365 )
2024-03-13 17:24:02 -06:00
Carson Gross
9431183cf1
port back double exec tests from 2.x to ensure its not an issue in 1.x, bump version
2024-03-01 15:50:21 -07:00
Vincent
01b292ada4
FormData + web component & parameters order tests
...
#1323 #1686 #2034 #1895
2024-01-25 11:05:53 +01:00
Carson Gross
fd775f84be
fix version and lint
2024-01-23 12:53:58 -07:00
Carson Gross
1023193b01
fix script tag double execution
2024-01-23 12:48:39 -07:00
Carson Gross
0a2c375970
Merge remote-tracking branch 'origin/v2.0v2.0' into v2.0v2.0
2024-01-23 12:16:08 -07:00
Denis Palashevskii
7fe27dd275
Refactor and expose swap
in public API ( #2191 )
...
* refactor and expose swapping as a single method
* fixes after rebasing on latest 2.0
* fix optional parameters for swapping
* add `fullSwap` to internal API
* swap refactor polishing
* make linter happy
2024-01-19 16:31:34 -07:00
Alexander Petros
0e67ac8081
Format tests
2024-01-18 10:20:34 -05:00
Carson Gross
3fa7df1d23
Merge branch 'dev' into v2.0v2.0
...
# Conflicts:
# dist/ext/sse.js
# dist/htmx.d.ts
# dist/htmx.js
# dist/htmx.min.js
# dist/htmx.min.js.gz
# src/htmx.js
# test/core/parameters.js
# www/content/docs.md
2024-01-15 14:26:50 -07:00
Alexander Petros
a49a98a991
Move extension-swap test and delete extension tests
2024-01-13 14:06:54 -05:00
Alexander Petros
172fb88972
Skip leaky shadowdom test
2024-01-13 12:21:33 -05:00
Carson Gross
d2d22c2903
restore old semantics w/ body returning its children
2023-12-27 19:10:35 -07:00
Carson Gross
ff96b78e77
move to template parsing by default (prep for head support)
2023-12-27 14:42:14 -07:00
Carson Gross
9fbbd17672
reformat
2023-12-24 16:37:51 -07:00
Carson Gross
3903e51672
fix up after merge
2023-12-24 15:33:09 -07:00
Carson Gross
0e61b21440
Merge branch 'v2.0v2.0' into config-return-behavor
...
# Conflicts:
# src/htmx.js
2023-12-24 15:17:53 -07:00
Carson Gross
66599ef887
Merge branch 'master' into dev
...
# Conflicts:
# www/content/docs.md
2023-12-21 17:28:58 -07:00
Vincent
23d473291d
Updated mocha, tests now work with node 20 ( #2122 )
...
* Updated mocha, tests now work with node 20
* Update package-lock.json
* Enable Node CI for v2.0v2.0 branch (#2123 )
Run tests for v2.0v2.0 branch too
* Bump CI's node version to 20.x
2023-12-21 16:54:02 -05:00
Alexander Petros
f4f35aec76
Format the rest of tests
2023-12-21 13:26:41 -05:00
Alexander Petros
290a78f6b0
Fix delete statement in two tests
2023-12-21 13:25:46 -05:00
Alexander Petros
4b890ce72d
Run linter on the tests too
2023-12-21 13:22:10 -05:00
Carson Gross
41e9ce3593
Merge branch 'dev' into v2.0v2.0
2023-12-20 15:48:47 -07:00
Thomas Cowart
078d5da5b4
Update parseInterval to handle "0" correctly ( #1835 )
...
* Update parseInterval to handle "0" correctly
When a parameter like "0ms" is passed in to parseInterval it gets parsed to 0.
Previously this would result in a return value of "undefined" because 0 is falsy
and thus the `return 0 || undefined` statements return undefined.
The purpose of the form `parseFloat(str) || undefined` was to return "undefined" if
parseFloat failed (parseFloat returns NaN, a falsy value, if it can't parse its
argument). Unfortunately, as mentioned, parseFloat can also succeed and return a
falsy value -- when the argument is "0" (or "0.0", etc.). So the new code, rather
than depending on the falsiness of the result of parseFloat, explicitly checks for
a NaN.
* Adds some semicolons
Adds some semicolons to parseInterval (and tests) for consistency.
* Add one more parseInterval test for "0"
Adds test test to make sure parseInterval works on "0".
* Adds functional tests for every, swap, settle, throttle, and delay
* Explcitly check that setTimeout values are > 0
These values come from user settings that are read from parseInterval,
so they could be a number or undefined.
If the value being checked is > 0 setTimeout will be called with some
associated function. If the value is 0 or 'undefined' the associated function
will be called immediately ('undefined' is not greater than 0).
* Change '!== undefined' to '> 0'
`pollInterval !== undefined` is a subtly different conditional than just `pollInterval` or `pollInterval > 0` (which are equivalent). Changes the conditional to `pollInterval > 0` so as to not change the behavior but also be more explicit in the test.
2023-12-20 15:46:04 -07:00
Carson Gross
46a1502a84
fix the shadow root tests interfering w/ other tests
2023-12-20 13:45:13 -07:00
Carson Gross
7c1c406efc
Merge branch 'v2.0v2.0' into merge-2075
...
# Conflicts:
# src/htmx.js
2023-12-20 13:22:49 -07:00
Carson Gross
b9dbbf52ca
Merge branch 'v2.0v2.0' into config-return-behavor
...
# Conflicts:
# src/htmx.js
2023-12-14 11:59:14 -07:00
Carson Gross
22fde35674
Merge branch 'dev' into v2.0v2.0
2023-12-13 14:46:37 -07:00