code: function getAncestorOrSelfWithJavascriptHref(element) {
      if (hasJavascriptHref(element)) {
          return element;
      }
      if (element.parentNode == null) {
          return null;
      }
      return getAncestorOrSelfWithJavascriptHref(element.parentNode);
  }
docs: Returns the given element, or its nearest ancestor, that satisfies
  hasJavascriptHref(). Returns null if none is found.
  
  @param element  the element whose ancestors to test