mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-09-28 05:21:18 +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
30 lines
1.3 KiB
HTML
30 lines
1.3 KiB
HTML
<h1>Event Target Test</h1>
|
|
|
|
<div role="tablist" hx-target="#page" hx-push-url="false">
|
|
<a role="tab" hx-get="/sse-target.html">Legacy Style</a>
|
|
<a role="tab" hx-get="/sse-target-ext.html" aria-selected="true">New Style</a>
|
|
</div>
|
|
|
|
<h3>Description</h3>
|
|
<p>
|
|
This page connects to several different different Server Sent Event (SSE) stream.
|
|
Contents from each stream are sent to a single DOM element.
|
|
</p>
|
|
<h3>Example HTML</h3>
|
|
<pre class="code">
|
|
<div hx-ext="sse" sse-connect="/users/sse.html" sse-target="#otherNode"></div>
|
|
<div id="otherNode"></div>
|
|
</pre>
|
|
<h3>Test Cases</h3>
|
|
<h3>Multiple Listeners using HX-Target to write to a single target node.</h3>
|
|
|
|
<div>
|
|
<div hx-ext="sse" sse-connect="/posts.html" sse-swap="message" hx-target="#otherNode"></div>
|
|
<div hx-ext="sse" sse-connect="/comments.html" sse-swap="message" hx-target="#otherNode"></div>
|
|
<div hx-ext="sse" sse-connect="/albums.html" sse-swap="message" hx-target="#otherNode"></div>
|
|
<div hx-ext="sse" sse-connect="/todos.html" sse-swap="message" hx-target="#otherNode"></div>
|
|
<div hx-ext="sse" sse-connect="/users.html" sse-swap="message" hx-target="#otherNode"></div>
|
|
</div>
|
|
|
|
<div class="container" id="otherNode">Waiting for records from any of: Posts/Comments/Albums/ToDos/Users</div>
|