bigskysoftware / bigskysoftware/htmx-extensions
[ws][Events] Any events of incoming messages?
- Dominant language
- JavaScript
- Stars
- 284
- Forks
- 88
- PR merge metrics
- No merged PRs in 30d
Description
I've been delving into HTMX WebSocket extensions, but I can't seem to find any events related to incoming messages. There are events like `htmx:wsBeforeMessage` and `htmx:wsBeforeMessage`, but they don't meet my requirements.
**My Requirement**
I have a data table connected to a websocket, and I need an event to be triggered on the client side when any changes are made to the data from the backend. The alternative options are `swap` or `pooling`, but I would like to listen for the event. Is there any event for this, or can we access the WebSocket instance on the client side?
I'm new to HTMX, so any help would be greatly appreciated.
Events: https://github.com/bigskysoftware/htmx-extensions/blob/main/src/ws/README.md#events
Contributor guide
Research direction
Start with the WebSocket extension README's Events section and review the client-side event handling described there. Clarify whether the requested behavior is a new incoming-message event or access to the WebSocket instance, then define the expected trigger and completion criteria before locating the relevant implementation and tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100