rem: addWidgetAsDirectChild: function(	/*Widget*/				widget, /*DomNode*/				overrideContainerNode, /*String, optional*/	pos, /*DomNode, optional*/	ref, /*int, optional*/		insertIndex){ 
add: addWidgetAsDirectChild: function(/*Widget*/	widget, overrideContainerNode, pos, ref, insertIndex){ 
context: 		addWidgetAsDirectChild: function(	/*Widget*/				widget, 											/*DomNode*/				overrideContainerNode, 											/*String, optional*/	pos, 											/*DomNode, optional*/	ref, 											/*int, optional*/		insertIndex){			// summary:			//		Process the given child widget, inserting it's dom node as			//		a child of our dom node			// overrideContainerNode: a non-default container node for the widget			// pos:			//		can be one of "before", "after", "first", or "last". This			//		has the same meaning as in dojo.dom.insertAtPosition()			// ref: a node to place the widget relative to			// insertIndex: DOM index, same meaning as in dojo.dom.insertAtIndex()			if((!this.containerNode)&&(!overrideContainerNode)){				this.containerNode = this.domNode;			}			var cn = (overrideContainerNode) ? overrideContainerNode : this.containerNode;			if(!pos){ pos = "after"; }			if(!ref){ 				if(!cn){ cn = dojo.body(); }				ref = cn.lastChild; 			}			if(!insertIndex) { insertIndex = 0; }			widget.domNode.setAttribute("dojoinsertionindex", insertIndex);			// insert the child widget domNode directly underneath my domNode, in the			// specified position (by default, append to end)			if(!ref){				cn.appendChild(widget.domNode);			}else{				// FIXME: was this meant to be the (ugly hack) way to support insert @ index?				//dojo.dom[pos](widget.domNode, ref, insertIndex);				// CAL: this appears to be the intended way to insert a node at a given position...				if (pos == 'insertAtIndex'){					// dojo.debug("idx:", insertIndex, "isLast:", ref === cn.lastChild);					dojo.dom.insertAtIndex(widget.domNode, ref.parentNode, insertIndex);				}else{					// dojo.debug("pos:", pos, "isLast:", ref === cn.lastChild);					if((pos == "after")&&(ref === cn.lastChild)){						cn.appendChild(widget.domNode);					}else{						dojo.dom.insertAtPosition(widget.domNode, cn, pos);					}				}			}		},
meta: 4707	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4707/50c3492c4c3c825dbd3401e134a19ed46799c456/DomWidget.js/clean/www/resources/dojo-ajax/src/widget/DomWidget.js