clean of string stream added (we still need <script> objects clean)
[xynt.git] / web / xynt / xynt-http-streaming-ifra.js
1 var ctx_new     = "";
2 var ctx_old_len = 0;
3 function push(s) {
4     // FIXME: remove this barbarian log
5     window.parent.console.log("ctx_new.length: "+ctx_new.length+"  ctx_old_len: "+ctx_old_len);
6     if (ctx_new.length == ctx_old_len && ctx_old_len > 0) {
7         // FIXME: remove this barbarian log
8         window.parent.console.log("NOW clean");
9         ctx_new = "";
10         ctx_old_len = 0;
11     }
12     if (s != null) {
13         ctx_new += "@BEGIN@"+s+"@END@";
14     }
15     else {
16         ctx_new += "_";
17     }
18 }