Event Delegation
What potential issue exists in this tooltip delegation?
document.addEventListener('mouseover', e => {
const target = e.target.closest('[data-tooltip]');
if (!target) return;
const tooltip = document.createElement('div');
tooltip.textContent = target.dataset.tooltip;
tooltip.className = 'tooltip';
target.appendChild(tooltip);
target.addEventListener('mouseout', () => {
tooltip.remove();
}, { once: true });
}, { passive: true });