more readable log, start/stop button added, many body related events traced
[xynt.git] / web / test-hs-rd.php
index 27146b4..4f13f24 100644 (file)
@@ -9,7 +9,7 @@ var ctx_new = "";
 window.onload = function () { if (http_streaming != "ready") http_streaming.reload(); };
 </script> 
 </head>
-<body>
+<body onabort = "console.log('rd abort');" onunload = "console.log('rd unload');" onerror = "console.log('rd error');" onkeypress = "console.log('rd keypress');">
 </body>
 <?php
 function mop_flush()
@@ -28,10 +28,10 @@ function main()
         // if ($i == 0)
         //    sleep(1);
      
-        if ($i != 8) {
+        if ($i != 8 || true) {
             printf("<script id='hs%d' type='text/javascript'>
-push(\"$('cont').innerHTML = '%d';\");
-</script>", $i, $i);
+push(\"$('cont').innerHTML += '%s %d';\");
+</script>", $i, ($i == 0 ? "<br/>" : ""), $i);
         }
         else {
             // exit();