src/model/css-select-adapter.js
/**
   * Finds the first node in the array that matches the test predicate, or one
   * of its children.
   */
Finds the first node in the array that matches the test predicate, or one
of its children.
Finds the first node in the array that matches the test predicate or one of its children .
function findOne(test, elems) {
    for (const node of elems) {
      if (test(node)) {
        return node;
      } else {
        const match = findOne(test, getChildren(node));
        if (match) return match;
      }
    }
    return null;
  }
function findOne ( test , elems ) { for ( const node of elems ) { if ( test ( node ) ) { return node ; } else { const match = findOne ( test , getChildren ( node ) ) ; if ( match ) return match ; } } return null ; }
Finds the first node in the array that matches the test predicate, or one
 of its children.
Finds the first node in the array that matches the test predicate or one of its children .