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

Function getNodeName

packages/core/src/util/dom.ts:93–97  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

91
92/** Gets a reasonable nodeName, even for clobbered nodes. */
93export function getNodeName(node: Node): string {
94 const nodeName = node.nodeName;
95 // If the property is clobbered, assume it is an `HTMLFormElement`.
96 return typeof nodeName === 'string' ? nodeName : 'FORM';
97}
98
99export function clobberedElementError(node: Node) {
100 return new Error(

Callers 3

startElementMethod · 0.90
endElementMethod · 0.90
walkIcuTreeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected