containsNode

fun containsNode(node: Node, allowPartialContainment: Boolean = definedExternally): Boolean(source)

MDN Reference