code: function () {
  		// collapsed attribute
  		this.collapsed = (this.startContainer == this.endContainer && this.startOffset == this.endOffset);
  		// find common ancestor
  		var node = this.startContainer;
  		while (node && node != this.endContainer && !DOMUtils.isAncestorOf(node, this.endContainer))
  			node = node.parentNode;
  		this.commonAncestorContainer = node;
  	}
docs: private methods