code: function getParentSVG(evt) {
    if (evt.nativeEvent && evt.nativeEvent.identifier !== undefined) {
      return undefined;
    }
    const getParent = (target) => {
      if (target.nodeName === "svg") {
        return target;
      } else {
        return target.parentNode ? getParent(target.parentNode) : target;
      }
    };
    return getParent(evt.target);
  }
docs: Exported Functions