generated from ElnuDev/go-project
Implent SSE feed
This commit is contained in:
parent
3a8179a99a
commit
b5ca22cd7d
2 changed files with 2 additions and 3 deletions
|
@ -7,8 +7,7 @@
|
|||
<script src="https://unpkg.com/htmx.org@1.9.3"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div hx-sse="connect:/api/counter">
|
||||
<div hx-sse="swap:count"></div>
|
||||
<div hx-sse="connect:/api/counter swap:count" hx-swap="beforebegin">
|
||||
</div>
|
||||
<button hx-get="/api/click1" hx-swap="innerHTML">Click me!</button>
|
||||
<br>
|
||||
|
|
Reference in a new issue