javascript check if element has parent with id 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);