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

Function getDebugNode

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

Source from the content-addressed store, hash-verified

722 * @publicApi
723 */
724export function getDebugNode(nativeNode: any): DebugNode | null {
725 if (nativeNode instanceof Node) {
726 if (!nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY)) {
727 (nativeNode as any)[NG_DEBUG_PROPERTY] =
728 nativeNode.nodeType == Node.ELEMENT_NODE
729 ? new DebugElement(nativeNode as Element)
730 : new DebugNode(nativeNode);
731 }
732 return (nativeNode as any)[NG_DEBUG_PROPERTY];
733 }
734 return null;
735}
736
737export function getAllDebugNodes(): DebugNode[] {
738 return Array.from(_nativeNodeToDebugNode.values());

Callers 5

constructorMethod · 0.90
childNodesMethod · 0.85
childrenMethod · 0.85
_addQueryMatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…