clean of string stream added (we still need <script> objects clean)
[xynt.git] / web / xynt / xynt-http-streaming-ifra.js
index 7b4124f..2450adf 100644 (file)
@@ -1,6 +1,14 @@
-var ctx_new = "";
-
+var ctx_new     = "";
+var ctx_old_len = 0;
 function push(s) {
+    // FIXME: remove this barbarian log
+    window.parent.console.log("ctx_new.length: "+ctx_new.length+"  ctx_old_len: "+ctx_old_len);
+    if (ctx_new.length == ctx_old_len && ctx_old_len > 0) {
+        // FIXME: remove this barbarian log
+        window.parent.console.log("NOW clean");
+        ctx_new = "";
+        ctx_old_len = 0;
+    }
     if (s != null) {
         ctx_new += "@BEGIN@"+s+"@END@";
     }