X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fhttp_streaming.js;h=4fa069f6ad3ff8611dbc535500aa2c738e5c6ac6;hb=6e77afdc4d237f78495ca70fdc82d1059d94643f;hp=802981272534637f5d44fa9855f110bd04c5fb42;hpb=8e2dd2d0326cd960560d55cd405c02825d4254d2;p=brisk.git diff --git a/web/http_streaming.js b/web/http_streaming.js index 8029812..4fa069f 100644 --- a/web/http_streaming.js +++ b/web/http_streaming.js @@ -26,8 +26,8 @@ * NOT MANDATORY * - type of streaming into the constructor * - all iframe related streaming add - * - substitute fixed "eval" with a generic command hunks processor * + * DONE - substitute fixed "eval" with a generic command hunks processor * DONE - myfrom (now from) into the constructor * DONE - target page into the constructor * DONE - gst management @@ -37,7 +37,7 @@ * */ -function http_streaming(gst, from, cookiename, sandbox, targetpage) +function http_streaming(gst, from, cookiename, sandbox, targetpage, cmdproc) { this.xhr = createXMLHttpRequest(); // this.xhr.setRequestHeader("Content-type", "text/html; charset=utf-8"); @@ -47,6 +47,7 @@ function http_streaming(gst, from, cookiename, sandbox, targetpage) this.cookiename = cookiename; this.sandbox = sandbox; this.targetpage = targetpage; + this.cmdproc = cmdproc; } http_streaming.prototype = { @@ -55,6 +56,7 @@ http_streaming.prototype = { cookiename: null, sandbox: null, targetpage: null, + cmdproc: null, /* cookiepath is automatically customized in installation phase */ cookiepath: "/brisk/", @@ -201,7 +203,7 @@ http_streaming.prototype = { // $("xhrdeltalog").innerHTML = "EVALL: "+singlecomm.replace("<", "<", "g"); +"
"; this.hbit("+"); - eval(singlecomm); + this.cmdproc(singlecomm); again = 1; } else {