compareBoundaryPoints

The compareBoundaryPoints() method of the Range interface compares the boundary points of the Range with those of another range.

MDN Reference