code: function getOffsetElement(el) {
      return el
          ? 'offsetTop' in el
              ? el
              : getOffsetElement(el.parentNode)
          : document.body;
  }
docs: SVG elements do not inherit from HTMLElement