src/js/base/core/dom.js
function listDescendant(node, pred) {
  const descendants = [];
  pred = pred || func.ok;

  // start DFS(depth first search) with node
  (function fnWalk(current) {
    if (node !== current && pred(current)) {
      descendants.push(current);
    }
    for (let idx = 0, len = current.childNodes.length; idx < len; idx++) {
      fnWalk(current.childNodes[idx]);
    }
  })(node);

  return descendants;
}
function listDescendant(node, pred) {
  const descendants = [];
  pred = pred || func.ok;

  // start DFS(depth first search) with node
  (function fnWalk(current) {
    if (node !== current && pred(current)) {
      descendants.push(current);
    }
    for (let idx = 0, len = current.childNodes.length; idx < len; idx++) {
      fnWalk(current.childNodes[idx]);
    }
  })(node);

  return descendants;
}
function listDescendant ( node , pred ) { const descendants = [ ] ; pred = pred || func . ok ; // start DFS(depth first search) with node ( function fnWalk ( current ) { if ( node !== current && pred ( current ) ) { descendants . push ( current ) ; } for ( let idx = 0 , len = current . childNodes . length ; idx < len ; idx ++ ) { fnWalk ( current . childNodes [ idx ] ) ; } } ) ( node ) ; return descendants ; }
listing descendant nodes

@param {Node} node
@param {Function} [pred] - predicate function
listing descendant nodes