more readable log, start/stop button added, many body related events traced
[xynt.git] / web / test-hs.php
1 <html>
2 <head>
3 <script type="text/javascript" src="xynt/xynt-commons.js"></script>
4 <script type="text/javascript" src="xynt/xynt-console.js"></script>
5 <script type="text/javascript" src="xynt/xynt-http-streaming.js"></script>
6 <script type="text/javascript"><!--
7 var allmythings="BEGIN";
8
9 <?php
10     if ($action != 'stop') {
11 ?>
12 window.onload = function () {
13     var hs;
14     hs = new http_streaming(window, console);
15     // FIXME: with relative path not work!
16     hs.start('http://dodo.birds.lan/xynt/test-hs-rd.php');
17     // hs.start('test-hs-rd.php');
18 };
19 <?php
20     }
21 ?>
22
23
24
25 window.onkeypress = function () {
26     console.log("win kpress");
27 }
28 //-->
29 </script>
30 <body onabort = "console.log('abort');" onunload = "console.log('unload');" onerror = "console.log('error');" onkeypress = "console.log('keypress');">
31 <div id="cont">INIT</div>
32 <?php
33     if ($action != 'stop') {
34 ?>
35     <a href="test-hs.php?action=stop">STOP</a>
36 <?php
37     } else {
38 ?>
39     <a href="test-hs.php?action=start">START</a>
40 <?php
41     }
42 ?>
43
44 </body>
45 </html>