src/ui/components/component.js
function _findNodesWithin(node, callback) {
    const children = node.childNodes;
    for (let i = 0; i < children.length; i++) {
      const innerNode = children[i];
      if (innerNode instanceof HTMLElement) {
        const isLUIComponent = Boolean(ComponentsHash[innerNode.tagName.toLowerCase()]);
        const result = callback(innerNode, isLUIComponent);
        if (result) return result;

        // If its not a custom webcomponent with children that it manages and owns, iterate on it
        if (!isLUIComponent) {
          const innerResult = this._findNodesWithin(innerNode, callback);
          if (innerResult) return innerResult;
        }
      }
    }
  }
function _findNodesWithin(node, callback) {
    const children = node.childNodes;
    for (let i = 0; i < children.length; i++) {
      const innerNode = children[i];
      if (innerNode instanceof HTMLElement) {
        const isLUIComponent = Boolean(ComponentsHash[innerNode.tagName.toLowerCase()]);
        const result = callback(innerNode, isLUIComponent);
        if (result) return result;

        // If its not a custom webcomponent with children that it manages and owns, iterate on it
        if (!isLUIComponent) {
          const innerResult = this._findNodesWithin(innerNode, callback);
          if (innerResult) return innerResult;
        }
      }
    }
  }
function _findNodesWithin ( node , callback ) { const children = node . childNodes ; for ( let i = 0 ; i < children . length ; i ++ ) { const innerNode = children [ i ] ; if ( innerNode instanceof HTMLElement ) { const isLUIComponent = Boolean ( ComponentsHash [ innerNode . tagName . toLowerCase ( ) ] ) ; const result = callback ( innerNode , isLUIComponent ) ; if ( result ) return result ; // If its not a custom webcomponent with children that it manages and owns, iterate on it if ( ! isLUIComponent ) { const innerResult = this . _findNodesWithin ( innerNode , callback ) ; if ( innerResult ) return innerResult ; } } } }
Iterate over all child nodes generated by the template; skip all subcomponent's child nodes.

If callback returns a value, then what is sought has been found; stop searching.  The returned value is the return value
for this function.

If searching for ALL matches, do not return a value in your callback.

@method _findNodesWithin
@private
@param {HTMLElement} node    Node whose subtree should be called with the callback
@param {Function} callback   Function to call on each node in the tree
@param {HTMLElement} callback.node   Node that the callback is called on
@param {Boolean} callback.isComponent   Is the node a Component from this framework
Iterate over all child nodes generated by the template ; skip all subcomponent s child nodes .