iris/_examples/http_responsewriter/server-side-events/optional.sse.js.html

17 lines
422 B
HTML
Raw Normal View History

<!-- you can just put that to your favourite browser -->
<html>
<head>
<title>SSE (javascript side)</title>
<script type="text/javascript">
var client = new EventSource("http://localhost:8080")
client.onmessage = function (msg) {
console.log(msg)
}
</script>
</head>
<body>
<h1>Open the browser's console(F12) and watch for incoming event messages</h1>
</body>
</html>