MCPcopy Create free account
hub / github.com/angular/angular / tryLocateRNodeByPath

Function tryLocateRNodeByPath

packages/core/src/hydration/node_lookup_utils.ts:100–108  ·  view source on GitHub ↗
(
  hydrationInfo: DehydratedView,
  lView: LView<unknown>,
  noOffsetIndex: number,
)

Source from the content-addressed store, hash-verified

98 * @returns an RNode that corresponds to the instruction index or null if no path exists
99 */
100export function tryLocateRNodeByPath(
101 hydrationInfo: DehydratedView,
102 lView: LView<unknown>,
103 noOffsetIndex: number,
104): RNode | null {
105 const nodes = hydrationInfo.data[NODES];
106 const path = nodes?.[noOffsetIndex];
107 return path ? locateRNodeByPath(path, lView) : null;
108}
109
110/**
111 * Locate a node in DOM tree that corresponds to a given TNode.

Callers 1

collectI18nNodesFromDomFunction · 0.90

Calls 1

locateRNodeByPathFunction · 0.85

Tested by

no test coverage detected