53 Commits

Author SHA1 Message Date
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
p.b
d1fc7895f6
Add textContent swap style (#2356)
* feat: add textContent swap style

* add documentation

---------

Co-authored-by: pbt <pb.to@icloud.com>
2024-02-29 11:11:46 -05:00
Carson Gross
c16758a198 alpha2 2024-02-09 11:13:47 -07:00
Carson Gross
36c01420d6 Merge branch 'master' into v2.0v2.0 2024-02-09 09:41:49 -07:00
Brandon Philips
fb94dfa832
www: mention hx-preserve on hx-boost (#2248)
This note would have really helped me when I was working on avoiding my
maplibre canvas div from being overwritten when using hx-boost. I was
initially confused by the hx-boost=false not thinking that is what I
needed.
2024-01-27 15:33:38 -05:00
Carson Gross
b32925937c Merge branch 'master' into v2.0v2.0 2024-01-23 12:49:02 -07:00
MikeMoolenaar
94ca5f5a36
Clarify hx-validate documentation (#2221) 2024-01-21 19:33:36 -05:00
Carson Gross
8b59cb9383 docs + config of head handling 2024-01-05 13:11:30 -07:00
Carson Gross
42668c6df7 Merge branch 'v2.0v2.0' into disable-inheritance
# Conflicts:
#	src/htmx.js
#	www/content/docs.md
2023-12-24 14:55:11 -07:00
Carson Gross
66599ef887 Merge branch 'master' into dev
# Conflicts:
#	www/content/docs.md
2023-12-21 17:28:58 -07:00
Vincent
67cfbcf6bc update docs on oob swaps 2023-12-21 12:52:57 -07:00
Vincent
afb36ac6e6 Removed outdated note in oob swap documentation (#2119)
(cherry picked from commit 0b7a68e352bbbd54e22bf7f9e4301959cad2de99)
2023-12-21 12:45:41 -07:00
Vincent
b9da68d970
Support encapsulating oob swap elements in templates in response (#2120) 2023-12-21 12:39:23 -07:00
Vincent
0b7a68e352
Removed outdated note in oob swap documentation (#2119) 2023-12-21 10:33:47 -05:00
Carson Gross
291cc1ee7d docs for inheritance disabling 2023-12-13 17:27:55 -07:00
Carson Gross
cd176d61d7 remove legacy hx-on= syntax 2023-12-13 14:59:48 -07:00
Carson Gross
b75962b9bb update docs 2023-12-13 14:45:47 -07:00
Carson Gross
3be4202e5e add support for dashes in hx-on* attributes 2023-12-07 15:15:10 -07:00
Jonathan Rietveld
7ef95e8963
Allow CSS selectors with whitespace in hx-trigger (#1913)
* Allow CSS selectors with whitespace in `hx-trigger`

Parsing of `hx-trigger` scans for whitespace, so if a CSS selector is used that contains whitespace, e.g. `form input`, a syntax error is raised.
A workaround is implemented by allowing such a CSS selector to be wrapped in either curly braces or parentheses.

* Add explanation whitespace in CSS selector to docs

* Tests for CSS selectors containing whitespace

* Use faster RegEx test, remove redundant variable declarations

* Added Descendant Combinator support to `root` and `target` modifiers

* Add missing semicolon

* Tests for descendant combinators in `root` and `target` modifiers

* Improve descendant combinator test coverage
2023-11-16 13:45:46 -07:00
Vincent
563ce5d042
List extended selectors + caveats in hx-include doc (#1522)
List extended selectors + caveats in hx-include doc
2023-11-06 16:53:34 -05:00
Sascha Woo
f2d776c151
Add config option to disable scroll into view for targets of boosted links and forms (#1459)
Thank you @xhaggi
2023-11-03 13:42:20 -05:00
Carson Gross
5cd5f927ba Merge branch 'master' into dev 2023-11-02 15:12:37 -06:00
matiboy
712ee759f1
Fix confirmed being ignored in htmx:confirm event (#1610)
* Current behavior testing

Testing current library behavior

* Test should remove correct handler

* Add question in htmx:confirm event detail

* Allow skipping window.confirm

* Additional test without hx-confirm value

* Wrap htmx.off in finally

* More correct assertion in case of no calls to confirm

* Remove erroneously added formatting

* Remove erroneously added formatting

* Documentation, fix loop

---------

Co-authored-by: mat <matt@techspace.asia>
2023-10-26 14:43:41 -06:00
Jason Jōb
142b711903
Fixed ws and sse references in the docs (#1908)
fixed ws and sse references in the docs
2023-10-20 13:32:40 -04:00
Vincent
7274454360
[New feature] selector-less next and previous targets (#1478)
* nextElementSibling and previousElementSibling target selectors

* Renamed nextElementSibling => next, previousElementSibling => previous
2023-10-06 22:25:03 -06:00
Elliott Brown
1e5dc7fba7
Fix reference in notes from hx-disable-elts to hx-disable-elt (#1838) 2023-10-01 19:28:28 +02:00
Carson Gross
a5fd1b7081 make singular to make more consistent w/ other attributes 2023-09-21 16:57:28 -06:00
Carson Gross
af0dc9c352 add hx-disabled-elts functionality 2023-09-14 13:20:46 -06:00
Sascha Woo
f15795e79c
Allow hx-swap options to be used without specifying modifier (innerHTML remains the default) (#1455)
* hx-swap: make swap style optional

* hx-swap: log an error when an unknown option or modifier is used
2023-09-14 10:57:30 -06:00
Carson Gross
c230931d42 support ability to ignore new title tags via config, event and hx-swap 2023-08-31 10:54:47 -06:00
Blake Williams
9ed1275ec3
Document hx-select-oob swap-strategy capabilities (#1694)
The `hx-select-oob` attribute supports specifying a swap strategy but
it's not publicly documented on the attribute page. This documents that
behavior so that it's easy to discover.
2023-08-15 17:29:22 -04:00
Alexander Petros
7ce53d4ce8
Tighten up hx-on docs (#1648)
Make the docs a little bit shorter so that the old form is still
documented without repeating information (and the new form is
emphasized). I also fixed a misplaced double quote in one of the
examples.
2023-08-01 14:28:29 -05:00
Carson Gross
4cb85e9856 Merge remote-tracking branch 'origin/dev' into dev 2023-07-25 12:56:19 -06:00
Oliver Djursing
c59fe799e8
Update hx-trigger throttle documentation (#1609) 2023-07-20 14:29:13 -04:00
Elnu
65bd1e15b2
Fix hx-on:* examples to use kebab-case event names, add clarification (#1611) 2023-07-18 18:41:52 -04:00
Viktor Szépe
0a471dc4fb
Fix typos in www/ (#1579) 2023-07-17 10:26:27 -04:00
Vincent
fd912f807f
Make it clear that from with a selector gets all matching elements (#1582) 2023-07-17 01:07:56 -04:00
Carson Gross
2edb023f20 Merge branch 'master' into dev
# Conflicts:
#	www/content/docs.md
2023-07-14 13:52:14 -06:00
Carson Gross
05a1f8cba7 Merge remote-tracking branch 'origin/dev' into dev 2023-07-14 13:50:31 -06:00
Micael Jarniac
88618809a2
Fix GitHub word capitalization (#1547)
* Fix GitHub capitalization

```diff
- Github
+ GitHub
```

* Fix GitHub capitalization

```diff
- github
+ GitHub
```
2023-07-10 15:54:18 -06:00
Yann Salaün
21f333c218
Fix typo (#1556) 2023-07-10 15:53:28 -06:00
Ben Croker
e9234823a2
Improve wording 2023-06-30 22:06:27 +03:00
Vincent
dd53ca0a75
Doc - make it clear that closest can return the element itself #1487 (#1488) 2023-06-15 11:48:32 -06:00
Alexander Petros
adef1166e2
Add support for hx-on:* attribute (#1489)
* Add support for hx-on:* attribute

* Use shorter XPath selector

* Add support for "hx-on::" shorthand

* Add note about mixing the two forms of `hx-on`
2023-06-13 09:23:16 -06:00
Elliott Brown
ec90998e77
Fix link (#1466) 2023-06-07 15:01:23 -06:00
Alexander Petros
be1cb533ed
Include note about 204 in hx-delete docs and examples (#1475) 2023-06-07 14:58:32 -06:00
Ben Croker
6180ad2b25
Fix incorrect attribute 2023-06-01 10:37:36 +02:00
pblkt
900c5cf97f
docs: fix repetition in hx-target.md (#1378) 2023-04-25 13:07:00 -06:00
Nathaniel Sabanski
360331d25a
hx-on: Added to Reference page, and revised docs: readability, wordiness. (#1365)
* hx-on: Added to Reference page, and revised docs, removed words.

* hx-on: Made first sample a <div> to showcase versatility.

* Minor revision.

* Minor revision.

* Fixed broken Locality of Behavior link.
2023-04-13 12:17:13 -06:00
Carson Gross
b71e3e380b fix up merge 2023-04-06 11:14:33 -06:00