htmx/test/servers/sse/static/sse-simple.html
2021-11-15 10:15:15 -07:00

20 lines
1.0 KiB
HTML

<h1>Simple Test</h1>
<h3>Description</h3>
<p>
This page connects to several different Server Sent Event (SSE) streams, listening on the default event name "message".
Each stream should populate its own container.
</p>
<h3>Example HTML</h3>
<pre class="code">
&lt;div hx-ext="sse" sse-url="http://localhost/posts.html" sse-swap="message"&gt;Waiting for Posts...&lt;/div&gt;
</pre>
<h3>Test Cases</h3>
<div hx-ext="sse">
<div class="container" hx-ext="sse" sse-url="http://localhost/posts.html" sse-swap="message">Waiting for Posts...</div>
<div class="container" hx-ext="sse" sse-url="http://localhost/comments.html" sse-swap="message">Waiting for Comments...</div>
<div class="container" hx-ext="sse" sse-url="http://localhost/albums.html" sse-swap="message">Waiting for Albums...</div>
<div class="container" hx-ext="sse" sse-url="http://localhost/todos.html" sse-swap="message">Waiting for ToDos...</div>
<div class="container" hx-ext="sse" sse-url="http://localhost/users.html" sse-swap="message">Waiting for Users...</div>
</div>