more readable log, start/stop button added, many body related events traced
[xynt.git] / web / test-hs.php
index 6804a99..3ffd263 100644 (file)
@@ -6,16 +6,40 @@
 <script type="text/javascript"><!--
 var allmythings="BEGIN";
 
+<?php
+    if ($action != 'stop') {
+?>
 window.onload = function () {
     var hs;
     hs = new http_streaming(window, console);
     // FIXME: with relative path not work!
     hs.start('http://dodo.birds.lan/xynt/test-hs-rd.php');
+    // hs.start('test-hs-rd.php');
+};
+<?php
+    }
+?>
+
+
+
+window.onkeypress = function () {
+    console.log("win kpress");
 }
-    
 //-->
 </script>
-<body>
+<body onabort = "console.log('abort');" onunload = "console.log('unload');" onerror = "console.log('error');" onkeypress = "console.log('keypress');">
 <div id="cont">INIT</div>
+<?php
+    if ($action != 'stop') {
+?>
+    <a href="test-hs.php?action=stop">STOP</a>
+<?php
+    } else {
+?>
+    <a href="test-hs.php?action=start">START</a>
+<?php
+    }
+?>
+
 </body>
 </html>