Added comment about websocket usage

master
noah metz 2023-12-30 14:37:36 -07:00
parent 64a9c18fe1
commit 54ca0a96d6
1 changed files with 3 additions and 2 deletions

@ -11,9 +11,10 @@
</head> </head>
<body> <body>
<h1>Test Page</h1> <h1>Test Page</h1>
<!-- Use "<p id=\"messages\">test_0</br></p>" as the websocket message to replace the "messages" div -->
<!-- Alternatively do "<p hx-swap-oob=\"beforeend:#messages\">test_0</br></p>" to add it to the end of the messages div -->
<div hx-ext="ws" ws-connect="/ws"> <div hx-ext="ws" ws-connect="/ws">
<div id="messages" hx-swap-oob="morphdom"> <div id="messages"></div>
</div>
</div> </div>
</body> </body>
</html> </html>