Implements Dom.ensureRangeInsideElem()