<commit_before>const closest = function(el, selector, rootNode) {
  const rootElement = rootNode || document.body;
  let element = el;
  const matchesSelector = element.matches
                          || element.webkitMatchesSelector
                          || element.mozMatchesSelector
                          || element.msMatchesSelector;
  while (element) {
    const flagRoot = element === rootElement;
    if (flagRoot || matchesSelector.call(element, selector)) {
      if (flagRoot) {
        element = null;
      }
      break;
    }
    element = element.parentElement;
  }
  return element;
};

const getScrollElement = function(el) {
  let element = el;
  do {
    const overflow = getComputedStyle(element).overflow;
    if ((overflow === 'auto' || overflow === 'scroll')
        && (element && element.nodeType
            && (element.offsetWidth < element.scrollWidth
                || element.offsetHeight < element.scrollHeight))) {
      break;
    }
    if (!element || !element.nodeType || element === document.body) {
      element = null;
      break;
    }
    element = element.parentElement;
  } while (element);<commit_msg>fixed issue as IE11 doesn't have svg parentElement<commit_after>const closest = function(el, selector, rootNode) {
  const rootElement = rootNode || document.body;
  let element = el;
  const matchesSelector = element.matches
                          || element.webkitMatchesSelector
                          || element.mozMatchesSelector
                          || element.msMatchesSelector;
  while (element) {
    const flagRoot = element === rootElement;
    if (flagRoot || matchesSelector.call(element, selector)) {
      if (flagRoot) {
        element = null;
      }
      break;
    }
    element = element.parentNode;
  }
  return element;
};

const getScrollElement = function(el) {
  let element = el;
  do {
    const overflow = getComputedStyle(element).overflow;
    if ((overflow === 'auto' || overflow === 'scroll')
        && (element && element.nodeType
            && (element.offsetWidth < element.scrollWidth
                || element.offsetHeight < element.scrollHeight))) {
      break;
    }
    if (!element || !element.nodeType || element === document.body) {
      element = null;
      break;
    }
    element = element.parentNode;
  } while (element);
{'fraction_non_alphanumeric': 0.11556503198294243, 'fraction_numerical': 0.0008528784648187633, 'mean_word_length': 2.3323863636363638, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7502889', 'n_tokens_mistral': 622, 'n_tokens_neox': 617, 'n_words': 148}