function buildVElementMatcher(selectors, getStartElements) {
  return (element) => {
    const elements = [...getStartElements(element)]
    /** @type {VElement|undefined} */
    let curr
    while ((curr = elements.shift())) {
      const el = curr
      if (selectors(el, element)) {
        return true
      }
      elements.push(...el.children.filter(isVElement))
    }
    return false
  }
}
@param {VElementMatcher} selectors
@param {(element: VElement) => VElement[]} getStartElements
@returns {VElementMatcher}