if(!this._parent) this._parent = this._first = node; if(up && root && node === this._first){ this._closed = true; } if(up){ var parent = this._parent; var script = ""; var ie = dojo.isIE && parent.tagName == "SCRIPT"; if(ie){ parent.text = ""; } if(parent._dirty){ var caches = parent._cache; for(var i = 0, cache; cache = caches[i]; i++){ if(cache !== parent){ this.onAddNode(cache); if(ie){ script += cache.data; }else{ parent.appendChild(cache); } this.onAddNodeComplete(cache); } } caches.length = 0; parent._dirty = false; } if(ie){ parent.text = script; } } this.onSetParent(node, up); this._parent = node; return this;