MCPcopy Index your code
hub / github.com/angular/angular / getNativeByTNodeOrNull

Function getNativeByTNodeOrNull

packages/core/src/render3/util/view_utils.ts:116–124  ·  view source on GitHub ↗
(tNode: TNode | null, lView: LView)

Source from the content-addressed store, hash-verified

114 * @param lView
115 */
116export function getNativeByTNodeOrNull(tNode: TNode | null, lView: LView): RNode | null {
117 const index = tNode === null ? -1 : tNode.index;
118 if (index !== -1) {
119 ngDevMode && assertTNodeForLView(tNode!, lView);
120 const node: RNode | null = unwrapRNode(lView[index]);
121 return node;
122 }
123 return null;
124}
125
126// fixme(misko): The return Type should be `TNode|null`
127export function getTNode(tView: TView, index: number): TNode {

Callers 1

_queryNodeChildrenFunction · 0.90

Calls 2

assertTNodeForLViewFunction · 0.90
unwrapRNodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…