element has descnenant code example
Example: javascript Check if an element is a descendant of another
const isDescendant = (child, parent) => parent.contains(child);
const isDescendant = (child, parent) => parent.contains(child);