function intersectsRange(range, touchingIsIntersecting) {
      assertRangeValid(this);

      if (getRangeDocument(range) != getRangeDocument(this)) {
        throw new DOMException("WRONG_DOCUMENT_ERR");
      }

      var startComparison = dom.comparePoints(this.startContainer, this.startOffset, range.endContainer, range.endOffset),
          endComparison = dom.comparePoints(this.endContainer, this.endOffset, range.startContainer, range.startOffset);

      return touchingIsIntersecting ? startComparison <= 0 && endComparison >= 0 : startComparison < 0 && endComparison > 0;
    }
// Sharing a boundary start-to-end or end-to-start does not count as intersection.
Sharing a boundary start-to-end or end-to-start does not count as intersection.
Sharing a boundary start - to - end or end - to - start does not count as intersection .
function intersectsRange(range, touchingIsIntersecting) {
      assertRangeValid(this);
      if (getRangeDocument(range) != getRangeDocument(this)) {
        throw new DOMException("WRONG_DOCUMENT_ERR");
      }
      var startComparison = dom.comparePoints(this.startContainer, this.startOffset, range.endContainer, range.endOffset),
          endComparison = dom.comparePoints(this.endContainer, this.endOffset, range.startContainer, range.startOffset);
      return touchingIsIntersecting ? startComparison <= 0 && endComparison >= 0 : startComparison < 0 && endComparison > 0;
    }
function intersectsRange ( range , touchingIsIntersecting ) { assertRangeValid ( this ) ; if ( getRangeDocument ( range ) != getRangeDocument ( this ) ) { throw new DOMException ( "WRONG_DOCUMENT_ERR" ) ; } var startComparison = dom . comparePoints ( this . startContainer , this . startOffset , range . endContainer , range . endOffset ) , endComparison = dom . comparePoints ( this . endContainer , this . endOffset , range . startContainer , range . startOffset ) ; return touchingIsIntersecting ? startComparison <= 0 && endComparison >= 0 : startComparison < 0 && endComparison > 0 ; }
Sharing a boundary start-to-end or end-to-start does not count as intersection.
Sharing a boundary start - to - end or end - to - start does not count as intersection .