MCPcopy Create free account
hub / github.com/angular/components / assertElementNode

Function assertElementNode

src/cdk/drag-drop/directives/assertions.ts:14–20  ·  view source on GitHub ↗
(node: Node, name: string)

Source from the content-addressed store, hash-verified

12 * @param name Name to attach to the error message.
13 */
14export function assertElementNode(node: Node, name: string): asserts node is HTMLElement {
15 if (node.nodeType !== 1) {
16 throw Error(
17 `${name} must be attached to an element node. ` + `Currently attached to "${node.nodeName}".`,
18 );
19 }
20}

Callers 3

constructorMethod · 0.90
_updateRootElementMethod · 0.90
constructorMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected