code: function( range )
  	{
  		range.collapsed = (
  			range.startContainer &&
  			range.endContainer &&
  			range.startContainer.equals( range.endContainer ) &&
  			range.startOffset == range.endOffset );
  	}
docs: Updates the "collapsed" property for the given range object.