516 Commits

Author SHA1 Message Date
Carson Gross
56ed5696e6 Merge branch 'master' into dev
# Conflicts:
#	www/attributes/hx-target.md
#	www/css/site.css
#	www/reference.md
#	www/themes/htmx-theme/templates/base.html
2023-04-11 10:05:27 -06:00
Carson Gross
110dd63e97 two small bug fixes:
* do not use template parsing for full body response content
* clear polling when reprocessing an element to avoid stacking up poll requests

latter fixes https://github.com/bigskysoftware/htmx/issues/1350
2023-04-11 09:32:52 -06:00
Carson Gross
7de777de6d Merge remote-tracking branch 'origin/dev' into dev 2023-04-05 12:48:07 -06:00
Carson Gross
6cc92bf12d fix https://github.com/bigskysoftware/htmx/issues/1348
properly trim ids in `hx-select-oob` and also support hyperscript-style query literals in attributes like `hx-target`
2023-04-05 12:47:51 -06:00
Nicolas Appriou
1e1b7cf94a
escape colons in querySelector (#1314)
thank you!
2023-04-01 17:36:15 -06:00
Mark Croxton
192df25b25
Normalize history cache keys - redux (#1338)
* Normalize URL used as a cache key for history, without breaking IE.

* Update test `boosted element hx-disinherit sanity check` to check that the fully resolved href of the boosted element matches request.detail.requestConfig.path
2023-04-01 08:02:08 -06:00
Carson Gross
5e12b33ed1 1.9.0 release prep 2023-03-31 07:07:34 -06:00
Carson Gross
b4e6c5cbd5 hx-on attribute 2023-03-31 06:44:01 -06:00
Carson Gross
2713a3ada0 Merge branch 'dev' into hx-on-experiment
# Conflicts:
#	src/htmx.js
#	test/scratch/scratch.html
2023-03-31 05:12:32 -06:00
Carson Gross
44dc3255af Merge remote-tracking branch 'origin/dev' into dev 2023-03-28 14:15:13 -06:00
Carson Gross
fd87ffd516 Experimental support for the [View Transitions API](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API) 2023-03-28 14:15:00 -06:00
Mark Croxton
8cd3a480a7
Nullify unreachable references to dom nodes inside setTimeout(), to allow garbage collection. (#1330) 2023-03-28 13:28:39 -06:00
Alexander Petros
5a5ebd7693
Add support for "naked" triggers and htmx:trigger event (#1327)
The `htmx:trigger` event is fired whenever an HTMX AJAX request would
be. Now, `hx-trigger` can also be specified on an element without an
AJAX request, which will simply fire the `htmx:trigger` event on the
action specified by the attribute, and do nothing else.

This pattern allows for specifying client-side actions that don't
require a network request, while remaining within the HTMX control
paradigm.
2023-03-28 09:14:16 -06:00
Carson Gross
a96189ed5e another take on generalized event handling w/ and hx-on attribute 2023-03-18 21:03:18 -06:00
Carson Gross
5de968e933 Merge branch 'master' into dev 2023-03-02 12:49:03 -07:00
Fredrik Vaeng Røtnes
03a286648d
Fix typo in comment (#1308) 2023-03-01 12:18:46 -07:00
Carson Gross
f84029badb fix https://github.com/bigskysoftware/htmx/issues/1264
update target to result of `beforeSwap` event
2023-02-24 11:01:53 -07:00
Carson Gross
26bd4002d0 Merge remote-tracking branch 'origin/dev' into dev 2023-02-23 13:48:14 -07:00
Carson Gross
bed3d25d2c fix https://github.com/bigskysoftware/htmx/issues/1259
store initial value on init of event listener so first trigger has correct value to compare against
2023-02-23 13:48:05 -07:00
Derek Kniffin
a85ad4ac67
Update UMD wrapper to include ESM support (#1263)
thank you!
2023-02-23 07:23:34 -07:00
Carson Gross
704739d1f0 fix https://github.com/bigskysoftware/htmx/issues/1236
handle single quotes in ids properly by escaping them in selectors
2023-02-16 11:11:50 -07:00
Carson Gross
ef02709a3e bump version 2023-02-16 09:25:34 -07:00
Carson Gross
7ea35d03c6 IE fix 2023-01-17 15:12:35 -07:00
Carson Gross
8d35686cf9 back out path normalization due to non-IE safe API use 2023-01-17 13:22:15 -07:00
Carson Gross
613f7b61d5 Support an opt-in cache-buster parameter that is sent up with htmx GET requests but that is stripped from the URL pushed into the browser's history 2023-01-08 17:35:07 -07:00
Carson Gross
447211742e IE support: return null explicitly, fixes https://github.com/bigskysoftware/htmx/issues/1047 2023-01-06 15:59:40 -07:00
Carson Gross
666c6aa8e5 support clicking on elements within a button element as well as directly on the element itself.
based on https://github.com/bigskysoftware/htmx/pull/1168
2023-01-06 14:18:00 -07:00
Ben Beecher
546fba2776
Hotfix for swapping fields that don't support setSelectionRange (#1187)
* Hotfix for swapping fields that don't support setSelectionRange

* Fix test
2023-01-04 08:54:38 -07:00
Thomas Eizinger
899c454580
Actually pass original event on to htmx:configRequest (#1156)
* Add failing test

* Use all arguments of `handler`
2022-12-17 07:19:39 -06:00
Carson Gross
30f762aa47 Merge branch 'master' into dev 2022-12-06 13:10:58 -07:00
Mark Croxton
4419bc4c90
History cache embargo (#1113)
* Add hx-history="false" to prevent sensitive or session data entering the localStorage cache

* Correctly get value of hx-history attribute.

* Add test for hx-history attribute.

* Allow history cache to be disabled when multiple `hx-history` attributes are present in a document, and any one of them is set to false.

* Add documentation for `hx-history` attribute.

* Add `hx-history` attribute to reference doc

* Correct the order of the `hx-history` attr in the reference doc.
2022-12-03 16:56:15 -06:00
Denis Palashevskii
36b017bc26
Add events support for WebSockets (#1126)
* Add events support for WebSockets

* Stop reconnection attempts after element has been removed

* Add tests for websockets

* Hide socker wrapper behind a more strict interface to avoid breaking changes in the future

* Fix legacy websocket tests interfering with new extension tests

* Minor doc fixes

* Add `wsBinaryType` configuration option
2022-12-03 16:53:59 -06:00
Billy Keyes
8520f6f374
Fix handling of repeated empty inputs (#1144)
Native form handling submits repeated empty inputs as an array with an
empty value for each input, but htmx would only submit the first
non-empty input and any following inputs. Fix the value collection code
so that it correctly distinguishes between empty values and new inputs.
2022-12-02 09:35:59 -07:00
Carson Gross
90db47fbea bump version 2022-12-01 08:05:32 -07:00
Carson Gross
a96163830d fix issue where a script element removes itself from the DOM on evaluation (apparently eCharts does this) 2022-12-01 08:03:47 -07:00
Mark Croxton
e2ecde0cb1
Normalise history cache key URLs, and prevent collisions in boosted anchors that use relative links. (#1112) 2022-11-09 10:34:30 -07:00
Carson Gross
822132d6a2 i am once again asking revealed to work in htmx 2022-11-05 09:17:26 -06:00
Carson Gross
fd3b410629 ie fix 2022-11-04 10:33:20 -06:00
Carson Gross
09dfd1009e ie fix 2022-11-04 10:27:22 -06:00
Carson Gross
4d3d282f37 fix ie incompatibility 2022-11-04 10:06:36 -06:00
Carson Gross
d16cf3c9bb hook to allow for custom confirmation dialogs, etc. 2022-10-30 13:14:28 -06:00
Carson Gross
6ec00b7bed update head-support.js 2022-10-28 10:17:27 -06:00
Carson Gross
e05c3fec29 bump to 1.8.3 for next release 2022-10-18 13:18:23 -06:00
Carson Gross
a87af0cb0d Merge branch 'master' into dev 2022-10-18 13:16:27 -06:00
Derek Kniffin
919079c7a4
Fix error message for responseError (#1077) 2022-10-18 09:06:48 -06:00
Carson Gross
c6c1395469 head-merge extension 2022-10-13 14:25:30 -06:00
Carson Gross
9af34ce0e3 fix revealed bug 2022-10-12 22:46:02 -06:00
Carson Gross
2c70dd4df3 prep 1.8.1 release 2022-10-11 10:25:04 -06:00
Carson Gross
e8014bdce0 update hash algorithm to something a bit more standard 2022-10-06 10:24:38 -06:00
Carson Gross
cab3e352eb Merge remote-tracking branch 'origin/dev' into dev 2022-10-02 16:43:12 -06:00