public ScriptExecutor(Window window) { this.window = window; this.root = window.document.body.getAttribute(ROOT_NAME, 0) as ScriptChannel; if (this.root == null) { window.document.body.setAttribute(ROOT_NAME, this.root = new ScriptChannel(), 0); } }
public ScriptChannel(Window window) { window.document.body.setAttribute(ScriptExecutor.ROOT_NAME, this, 0); window.execScript(ScriptExecutor.ROOT + @".toArray=function(value){ var ret=[]; for(var i=0,m=value.length;i<m;i++){ ret[i]=value.getVal(i); } }"); }