X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fhttp_streaming.js;h=58d8a1aaa3523219733bdbc0490e32bdf75ae130;hb=484a365c1e66ba4b878117275423a1594c209960;hp=802981272534637f5d44fa9855f110bd04c5fb42;hpb=8e2dd2d0326cd960560d55cd405c02825d4254d2;p=brisk.git diff --git a/web/http_streaming.js b/web/http_streaming.js index 8029812..58d8a1a 100644 --- a/web/http_streaming.js +++ b/web/http_streaming.js @@ -1,7 +1,7 @@ /* * brisk - http_streaming.js * - * Copyright (C) 2006-2011 Matteo Nastasi + * Copyright (C) 2006-2012 Matteo Nastasi * mailto: nastasi@alternativeoutput.it * matteo.nastasi@milug.org * web: http://www.alternativeoutput.it @@ -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 {