<div class="parent">
<div class="child">
<span>lorem</span>
<span>lorem</span>
</div>
</div>
let parent = document.querySelector('.parent');
parent.addEventListener('click', function(e) {
});
let parent = document.querySelector('.parent');
const spans = document.querySelectorAll(`span`);
parent.addEventListener('click', function (e) {
spans.forEach(el => {
console.log(e.target.contains(el));
});
});