19 Commits

Author SHA1 Message Date
Viktor Szépe
9fb3c0e492
Fix variable names (#3344)
* Fix variable names

* Fix one more variable name
2025-07-14 17:38:39 -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
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
Jonathan
99285cd5c3
fix for hx-swab-oob within web components (#2846)
* Failing test for oob-swap within web components

* hx-swap-oob respects shadow roots

* Lint and type fixes

* fix jsdoc types for rootNode parameter

* Fix for linter issue I was confused about before

* oob swaps handle global correctly

* swap uses contextElement if available, document if not

Previous a commit made swapOptions.contextElement a required field. This
could have harmful ramifications for extensions and users, so instead,
the old behavior of assuming document as a root will be used if the
contextElement is not provided.

* rootNode parameter is optional in oobSwap

If not provided, it will fall back to using document as rootNode. jsdocs
have been updated for oobSwap and findAndSwapElements accordingly.
2024-10-02 19:44:41 -06:00
MichaelWest22
0e1eeec8b4
remove extra hx-swap-oob attribute that is not used in the page (#2823)
remove extra hx-swap-oob tag that is not used in the page
2024-10-02 19:40:54 -06:00
Carson Gross
97b8c68dd3 release prep 2024-08-05 13:53:08 -06:00
Carson Gross
084df38c31 only removed templates explicitly used for encapsulating oob swaps
fixes https://github.com/bigskysoftware/htmx/issues/2776
2024-08-05 13:37:31 -06:00
Joe Taber
520502121e
Add config option to ignore nested oob-swaps instead of processing them (#1235)
* Add config option to ignore nested oob swaps

* Fix oobElement root check

* Save config between tests; repeat some tests with different configs

* Add tests for oob-swaps in html, body tags

* Don't unnecessarily change const to var
2024-03-11 12:32:30 -04:00
Carson Gross
9fbbd17672 reformat 2023-12-24 16:37:51 -07:00
Vincent
b9da68d970
Support encapsulating oob swap elements in templates in response (#2120) 2023-12-21 12:39:23 -07:00
Alexander Petros
4b890ce72d Run linter on the tests too 2023-12-21 13:22:10 -05:00
Carson Gross
84d8e33deb fix tests 2022-10-30 13:49:29 -06:00
Arham Jain
5045534d26 added two simple tests for delete mode 2021-11-24 21:23:35 -05:00
msladecek
038821cca8 swap into all elements matching the out-of-band css selector 2021-11-13 12:10:13 +01:00
carson
230e2f65df support a CSS selector in the hx-swap-oob attributes 2020-12-11 15:33:24 -07:00
carson
b96e5e771e allow hx-swap-oob to be at any level in returned content 2020-12-11 15:00:44 -07:00
carson
7036557cba oob swapping fixes and firm up the settle step quite a bit 2020-05-25 16:34:19 -07:00
carson
ba6d38e9dd Fix https://github.com/bigskysoftware/htmx/issues/19
clean up uses of getRawAttribute() and add a `data-*` test for all attribute tests.
2020-05-23 04:52:52 -07:00
carson
3aa8c64754 le big re-rename 2020-05-17 05:22:19 -07:00