window.document.addEventListener('click', (e) => { if (e.target.className === 'task-delete') { alert('ss'); } console.log(e.target.tagName); });