bigskysoftware / bigskysoftware/htmx-extensions
websocket replace root element without id
- Dominant language
- JavaScript
- Stars
- 284
- Forks
- 88
- PR merge metrics
- No merged PRs in 30d
Description
In ws extension everything is built on top of oobSwap making it impossible for incoming messages to swap innerHTML of the connecting element.
I want to run 2 (almost) identical websockets and it would cause ids to collide, is it possible to somehow not rely on the ids but swap the innerHTML of the element that is specified to be connected?
Example:
```html
```
Any help is appreciated!
Contributor guide
Research direction
Start by locating the WebSocket extension code that uses oobSwap and trace how incoming messages select their target. Reproduce the two ws-connect elements from the issue, then determine how each connection can update its own element without relying on colliding ids. Done means both connections independently replace their specified element content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100