findChild(condition) {
    const yes = condition(this);
    if (yes) {
      return this;
    }
    if (this.childNodes.length) {
      for (let i = 0; i < this.childNodes.length; i += 1) {
        const childNode = this.childNodes[i];
        const targetChild = this.findChild.call(childNode, condition);
        if (targetChild) {
          return targetChild;
        }
      }
    }
    return null;
  }
/**
   * Find a specific target with condition
   */
Find a specific target with condition
Find a specific target with condition
findChild(condition) {
    const yes = condition(this);
    if (yes) {
      return this;
    }
    if (this.childNodes.length) {
      for (let i = 0; i < this.childNodes.length; i += 1) {
        const childNode = this.childNodes[i];
        const targetChild = this.findChild.call(childNode, condition);
        if (targetChild) {
          return targetChild;
        }
      }
    }
    return null;
  }
findChild ( condition ) { const yes = condition ( this ) ; if ( yes ) { return this ; } if ( this . childNodes . length ) { for ( let i = 0 ; i < this . childNodes . length ; i += 1 ) { const childNode = this . childNodes [ i ] ; const targetChild = this . findChild . call ( childNode , condition ) ; if ( targetChild ) { return targetChild ; } } } return null ; }
Find a specific target with condition
Find a specific target with condition