docs: function getElementIndexOfParent(element, filter) {
    const parentNode = element.parentNode;
    const children = parentNode.children;
    let index = 0;
    for (let i = 0, len = children.length; i < len; i++) {
      if (filter && children[i].classList.contains(filter)) {
        continue;
      }
      if (children[i] === element) {
        return index;
      }
      index++;
    }
    return -1;
  }