summaryrefslogtreecommitdiff
path: root/deps/wse/priv/location.html
blob: b8eb3dfe7310d724f9b90852d9b1c98ebd8bed61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<html>
<head>
<title>Location demo page</title>
<script src='ej.js'></script>
<script src='wse.js'></script>
<script>

window.onload = function() {
   if (Wse.open("ws://"+(location.hostname||"localhost")+":1234/websession")) {
      Wse.start('wse_location_demo', 'run', ["location"]);
   }
   else
     alert("WebSockets not supported");
};

</script>
</head>
<body style="background: #333">
  <input name="webpage" placeholder="webpage" type="text" id="webpage"/>
  <button onclick="goto()">Goto</button>
<script>
  function goto() {
  var location = document.getElementById("webpage").value;
  window.console.debug("Goto " +location);
  Wse.call('wse_location_demo', 'goto', [location]);
}
</script>

</body>
</html>