code: function (how, sourceRange) {
  		// get anchors
  		var containerA, offsetA, containerB, offsetB;
  		switch (how) {
  		    case DOMRange.START_TO_START:
  		    case DOMRange.START_TO_END:
  			containerA = this.startContainer;
  			offsetA = this.startOffset;
  			break;
  		    case DOMRange.END_TO_END:
  		    case DOMRange.END_TO_START:
  			containerA = this.endContainer;
  			offsetA = this.endOffset;
  			break;
  		}
  		switch (how) {
  		    case DOMRange.START_TO_START:
  		    case DOMRange.END_TO_START:
  			containerB = sourceRange.startContainer;
  			offsetB = sourceRange.startOffset;
  			break;
  		    case DOMRange.START_TO_END:
  		    case DOMRange.END_TO_END:
  			containerB = sourceRange.endContainer;
  			offsetB = sourceRange.endOffset;
  			break;
  		}
  		
  		// compare
  		return containerA.sourceIndex < containerB.sourceIndex ? -1 :
  		    containerA.sourceIndex == containerB.sourceIndex ?
  		        offsetA < offsetB ? -1 : offsetA == offsetB ? 0 : 1
  		        : 1;
  	}
docs: other methods