code: function supportRangeBounds() {
      var r, testElement, rangeBounds, rangeHeight, support = false;
  
      if (doc.createRange) {
        r = doc.createRange();
        if (r.getBoundingClientRect) {
          testElement = doc.createElement('boundtest');
          testElement.style.height = "123px";
          testElement.style.display = "block";
          doc.body.appendChild(testElement);
  
          r.selectNode(testElement);
          rangeBounds = r.getBoundingClientRect();
          rangeHeight = rangeBounds.height;
  
          if (rangeHeight === 123) {
            support = true;
          }
          doc.body.removeChild(testElement);
        }
      }
  
      return support;
    }
docs: Test whether we can use ranges to measure bounding boxes Opera doesn't provide valid bounds.height/bottom even though it supports the method.