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

Function getDebugNode

packages/core/src/debug/debug_node.ts:721–732  ·  view source on GitHub ↗
(nativeNode: any)

Source from the content-addressed store, hash-verified

719 * @publicApi
720 */
721export function getDebugNode(nativeNode: any): DebugNode | null {
722 if (nativeNode instanceof Node) {
723 if (!Object.hasOwn(nativeNode, NG_DEBUG_PROPERTY)) {
724 (nativeNode as any)[NG_DEBUG_PROPERTY] =
725 nativeNode.nodeType == Node.ELEMENT_NODE
726 ? new DebugElement(nativeNode as Element)
727 : new DebugNode(nativeNode);
728 }
729 return (nativeNode as any)[NG_DEBUG_PROPERTY];
730 }
731 return null;
732}
733
734/**
735 * A boolean-valued function over a value, possibly including context information

Callers 5

constructorFunction · 0.90
childNodesMethod · 0.85
childrenMethod · 0.85
_addQueryMatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected