30 Commits

Author SHA1 Message Date
Stu Kennedy
7510030e59
Websocket extension for HTMX (#3547)
* feat: add hx-ws WebSocket extension with accompanying tests and debug utilities.

* feat: Refine WebSocket extension initialization and processing logic, preventing re-initialization and ensuring comprehensive element handling.

* refactor: Enhance WebSocket connection handling with improved event triggering and dynamic configuration management

* refactor: Introduce dynamic configuration management for WebSocket connections, consolidating default settings into a dedicated function for improved maintainability and clarity.

* refactor: Update WebSocket extension to improve reconnection logic and dynamic configuration handling, enhancing maintainability and clarity.

* docs: Expand WebSocket extension documentation with detailed architecture, attributes, message formats, and example use cases for improved clarity and usability.

* refactor: Update WebSocket message structure to include default values for channel and format, enhancing clarity in documentation and implementation.

* feat: Add default `channel` and `format` values to WebSocket messages if not provided.
2025-11-23 11:38:02 -07:00
MichaelWest22
d569ce6ccf
move to registerExtension to avoid extension upgrade confusion (#3546)
* move to registerExtension to avoid extension upgrade confusion

* Also fix window.htmx export to make modules work with extensions and add initial types file

* update docs on module use

---------

Co-authored-by: MichaelWest22 <michael.west@docuvera.com>
2025-11-22 10:58:38 -07:00
Carson Gross
55f1c17dc0 abort any outstanding requests after tests, make the trigger tests properly await the requests they create to avoid cross-test contamination. :/ 2025-11-06 12:34:53 -07:00
Carson Gross
8fd2c86e84 tighten up the timeout 2025-11-06 11:54:48 -07:00
Carson Gross
e10768991d test cleanup 2025-11-06 11:53:18 -07:00
Carson Gross
0b48282a0f test cleanup 2025-11-06 11:52:14 -07:00
Carson Gross
66024ee1ea change __htmx prefix to _htmx so it doesn't get privatized 2025-11-02 22:56:58 -07:00
Carson Gross
835593025c fix tests 2025-11-02 17:02:44 -07:00
Carson Gross
969009716c optimistic tests and a fix 2025-10-31 16:23:14 -06:00
Carson Gross
225668e7d0 make find and findAll really call findExt and findAllExt (right thing) 2025-10-31 15:29:37 -06:00
Carson Gross
dc6445f0a8 clean up tests 2025-10-31 14:25:32 -06:00
Carson Gross
4acd40ee0d pass through fetch response args 2025-10-30 20:41:22 -06:00
scriptogre
afb1af04e1
add server-sent events (sse) streaming support
Implement native SSE handling with configurable stream modes (once/continuous), automatic reconnection with exponential backoff, and lifecycle events.

Streams are configured via hx-stream attribute or htmx.config.streams global defaults.

Update test infrastructure with ReadableStream-based mocking utilities.

# Conflicts:
#	src/htmx.js
2025-10-28 16:13:43 +02:00
Carson Gross
083b0100de Merge branch 'four' into swap-refactor
# Conflicts:
#	src/htmx.js
2025-10-27 10:13:19 -06:00
Carson Gross
b3ec7ff326 add trigger test 2025-10-27 07:35:15 -06:00
MichaelWest22
e208901cbd refactor swap 2025-10-28 01:53:32 +13:00
Carson Gross
ccdb704740 more ctx.request work 2025-10-26 15:11:42 -06:00
Carson Gross
2d0839a928 move code into four branch 2025-10-26 13:26:44 -06:00
Alexander Petros
4e7baa3405 Remove libs for extension tests 2024-01-13 14:17:52 -05:00
carson
444660158f regression for hyperscript htmx:afterRequest form reset integration 2021-06-14 09:46:55 -06:00
carson
6026923ad1 site fixes and get rid of the broken ci 2021-03-11 05:53:57 -07:00
carson
16765b39bf support the on load syntax in hyperscript 2021-01-03 09:15:43 -07:00
carson
45f3909b9c Update htmx to latest hyperscript, fix tests 2020-09-11 08:00:45 -06:00
carson
93cfc2e1f6 update to alpha4 2020-06-30 16:15:22 -07:00
carson
4f3cf2d889 Move events from <event name>.htmx (jQuery style) to htmx:<event name> (zepto style)
fixes https://github.com/bigskysoftware/htmx/issues/109
2020-06-30 10:45:30 -07:00
carson
84200f4599 update hyperscript and docs 2020-06-13 13:17:25 -07:00
carson
0ac641b63f remove the hx-error-url attribute in favor of hyperscript
add basic hyperscript compatibility testing
2020-06-12 13:42:55 -07:00
carson
468c405d02 fix https://github.com/bigskysoftware/htmx/issues/33 - include empty input values in request 2020-05-23 09:23:29 -07:00
carson
cdb80690e9 support client side templating via an extension 2020-05-23 08:33:25 -07:00
carson
b96b9e3e32 support morphdom swapping as an extension
fixes https://github.com/bigskysoftware/htmx/issues/6
2020-05-22 11:18:39 -07:00