remote server prototype
authorken <ken@mihrtec.com>
Fri, 23 Jun 2017 01:21:51 +0000 (18:21 -0700)
committerken <ken@mihrtec.com>
Fri, 23 Jun 2017 01:21:51 +0000 (18:21 -0700)
remote-server.html [new file with mode: 0644]

diff --git a/remote-server.html b/remote-server.html
new file mode 100644 (file)
index 0000000..3d4ee3c
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<html>
+  <head>
+    <script type="text/javascript">
+      function testStrapp() {
+      document.getElementById("strapp-admin").innerHTML = "Dead"
+      if ("WebSocket" in window) {
+      const wsock = new WebSocket("wss://$HOST:$PORT")
+      wsock.onopen = () => {
+      wsock.send("Test message")
+      document.getElementById("strapp-admin").innerHTML = "Sent test"
+      }
+      wsock.onmessage = (evt) => {
+      document.getElementById("strapp-admin").innerHTML = "Got Response\r\n" + evt.data
+      }
+      }
+      else {
+      document.getElementById("strapp-admin").innerHTML = "Your browser does not support Strapp"
+      }
+      }
+    </script>
+  </head>
+  <body onload="javascript:testStrapp()">
+    <div id="strapp-admin">
+      Unterminated
+    </div>
+  </body>
+</html>