4 ms·
If the user clicks on something where nothing should happen, it does not matter if nothing happens 1ms slower. OTOH if something else should happen, that event
by tuukkah 3y ago
If the user clicks on something where nothing should happen, it does not matter if nothing happens 1ms slower.
OTOH if something else should happen, that event handler can call event.stopPropagation(). This stops the event from reaching the delegated event handler, so no inefficiency there.