Stay organized with collections Save and categorize content based on your preferences.

blockly > utils > dom > containsNode

utils.dom.containsNode() function

Whether a node contains another node.

Signature:

export declare function containsNode(parent: Node, descendant: Node): boolean;

Parameters

Parameter Type Description
parent Node The node that should contain the other node.
descendant Node The node to test presence of.

Returns:

boolean

Whether the parent node contains the descendant node.