Sha256: 10854ebab3e1bf38a10b18cdebc55721e8710f7049bc7668d2bf4f9572272139

Contents?: true

Size: 702 Bytes

Versions: 22

Compression:

Stored size: 702 Bytes

Contents

<!doctype html>
<html lang="en">
<head>
  <title>SSE Client</title>
</head>
<body>
  <h1>SSE Client</h1>
  <script>
    var connect = function () {
      console.log("connecting...");
      var eventSource = new EventSource("/agent/sse/events");

      eventSource.addEventListener('open', function(e) {
        console.log("connected");
        document.querySelector('#status').innerText = 'connected';
        return false;
      }, false);

      eventSource.addEventListener('message', function(e) {
        document.querySelector('#msg').innerText = e.data;
      }, false);
    };

    window.onload = connect;
  </script>
  <h1 id="status">disconnected</h1>
  <h1 id="msg"></h1>
</body>
</html>

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
tipi-0.55 df/sse_page.html
tipi-0.54 df/sse_page.html
tipi-0.53 df/sse_page.html
tipi-0.52 df/sse_page.html
tipi-0.51 df/sse_page.html
tipi-0.50 df/sse_page.html
tipi-0.49 df/sse_page.html
tipi-0.47 df/sse_page.html
tipi-0.46 df/sse_page.html
tipi-0.45 df/sse_page.html
tipi-0.43 df/sse_page.html
tipi-0.42 df/sse_page.html
tipi-0.41 df/sse_page.html
tipi-0.40 df/sse_page.html
tipi-0.39 df/sse_page.html
tipi-0.38 df/sse_page.html
tipi-0.37.2 df/sse_page.html
tipi-0.37.1 df/sse_page.html
tipi-0.37 df/sse_page.html
tipi-0.36 df/sse_page.html