mirror of
https://github.com/bigskysoftware/htmx.git
synced 2026-03-05 21:49:23 +00:00
absolute 👑
* Restore WS and SSE code
First pass at restoring removed ws and sse code. More to come.
* More progress on WS and SSE restore
* Update htmx.js
crucial whitespace
* Update documentation
* Combine SSE and WS servers into single "realtime" demo
* Realtime Test Server Updates
- separated tests for old- and new- style calling
- updated intro content and stylesheet
- removed extensions from manual test suite
* Remove SSE/WS from manual tests
25 lines
1.2 KiB
HTML
25 lines
1.2 KiB
HTML
<h1>Multi-Channel Test</h1>
|
|
|
|
<div role="tablist" hx-target="#page" hx-push-url="false">
|
|
<a role="tab" hx-get="/sse-multichannel.html" aria-selected="true">Legacy Style</a>
|
|
<a role="tab" hx-get="/sse-multichannel-ext.html">New Style</a>
|
|
</div>
|
|
|
|
<h3>Description</h3>
|
|
<p>
|
|
This page connects to a single different Server Sent Event (SSE) stream, listening on events named "Event1", "Event2", "Event3", and "Event4".
|
|
Each separate kind of event should swap into a different container.
|
|
</p>
|
|
<h3>Example HTML</h3>
|
|
<pre class="code">
|
|
<div hx-sse="connect:http://localhost/posts.html?types=Event1%2cEvent2%2cEvent3%2cEvent4">
|
|
<div hx-sse="swap:Event1">Waiting for Posts in Event1 channel...</div>
|
|
</div>
|
|
</pre>
|
|
<div hx-sse="connect:http://localhost/posts.html?types=Event1%2cEvent2%2cEvent3%2cEvent4">
|
|
<h3>Test Cases</h3>
|
|
<div class="container" hx-sse="swap:Event1">Waiting for Posts in Event1 channel...</div>
|
|
<div class="container" hx-sse="swap:Event2">Waiting for Posts in Event2 channel...</div>
|
|
<div class="container" hx-sse="swap:Event3">Waiting for Posts in Event3 channel...</div>
|
|
<div class="container" hx-sse="swap:Event4">Waiting for Posts in Event4 channel...</div>
|
|
</div> |