const elementContains = (parent, child) => parent !== child && parent.contains(child);