MCPcopy
hub / github.com/angular/angular / _queryNodeChildrenInContainer

Function _queryNodeChildrenInContainer

packages/core/src/debug/debug_node.ts:585–599  ·  view source on GitHub ↗

* Process all TNodes in a given container. * * @param lContainer the container to be processed * @param predicate the predicate to match * @param matches the list of positive matches * @param elementsOnly whether only elements should be searched * @param rootNativeNode the root native node on

(
  lContainer: LContainer,
  predicate: Predicate<DebugElement> | Predicate<DebugNode>,
  matches: DebugElement[] | DebugNode[],
  elementsOnly: boolean,
  rootNativeNode: any,
)

Source from the content-addressed store, hash-verified

583 * @param rootNativeNode the root native node on which predicate should not be matched
584 */
585function _queryNodeChildrenInContainer(
586 lContainer: LContainer,
587 predicate: Predicate<DebugElement> | Predicate<DebugNode>,
588 matches: DebugElement[] | DebugNode[],
589 elementsOnly: boolean,
590 rootNativeNode: any,
591) {
592 for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
593 const childView = lContainer[i] as LView;
594 const firstChild = childView[TVIEW].firstChild;
595 if (firstChild) {
596 _queryNodeChildren(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);
597 }
598 }
599}
600
601/**
602 * Match the current native node against the predicate.

Callers 1

_queryNodeChildrenFunction · 0.85

Calls 1

_queryNodeChildrenFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…