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

Function tryLocateRNodeByPath

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

Source from the content-addressed store, hash-verified

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