htmx/test/ws-sse/static/ws-echo-ext.html
Denis Palashevskii 23256373fc
Remove legacy WS/SSE code (#2095)
* apply updated patch with legacy WS/SSE removal

* remove legace WS/SSE from the test server also

* remove sse mention from getTriggerSpec()

* clean up sse.js implementation after removal of hx-sse
2023-12-14 15:54:16 -07:00

37 lines
982 B
HTML

<main>
<h1>Echo Test</h1>
<h3>Description</h3>
<p>This test lets you send and receive data to and from the WebSocket server. Every message that you send to the server will be "echoed"
back to you in a separate message</p>
<h3>Example HTML</h3>
<pre class="code">
&lt;div hx-ext="ws" ws-connect="ws://localhost/echo"&gt;
&lt;form ws-send&gt;
&lt;input type="text" name="message" style="width:500px;" value="This Is The Message" /&gt;
&lt;input type="submit"/&gt;
&lt;/form&gt;
&lt;div id="idMessage"&gt;&lt;/div&gt;
&lt;/div&gt;
</pre>
<div class="elastic container" hx-ext="ws" ws-connect="/echo">
<form ws-send="">
<h3>Send a Message</h3>
<div>
<input type="text" name="message" style="width:500px;" value="This Is The Message" />
<input type="submit" value="Send" class="btn primary"/>
</div>
</form>
<br>
<h3>Receive a Message</h3>
<div id="idMessage"></div>
</div>
</main>