function getBoundingClientRect(el) {
    var rect

    try {
      rect = el.getBoundingClientRect()
    } catch (err) {
      // Ignore Windows 7 IE11 "Unspecified error"
      // https://github.com/w3c/IntersectionObserver/pull/205
    }

    if (!rect) return getEmptyRect()

    // Older IE
    if (!(rect.width && rect.height)) {
      rect = {
        top: rect.top,
        right: rect.right,
        bottom: rect.bottom,
        left: rect.left,
        width: rect.right - rect.left,
        height: rect.bottom - rect.top,
      }
    }
    return rect
  }
Shims the native getBoundingClientRect for compatibility with older IE.
@param {Element} el The element whose bounding rect to get.
@return {DOMRect|ClientRect} The (possibly shimmed) rect of the element.