contains

fun contains(other: Node?): Boolean(source)

Returns true if other is an inclusive descendant of node, and false otherwise.

MDN Reference