Traverse vs Event Bubbling
I am totally confused between traverse and event bubbling? Can someone explain please,
Ezell Frazier22,060 Points
Event Bubbling and DOM Traversal aren't competing against one another. Event Bubbling is part of the concept of DOM Traversal.
Event bubbling is similar to dropping a pencil in an empty auditorium. A person at the other end of the auditorium likely heard the pencil drop, as the sound traverses from the point of impact to the listener's ear.
A parent element always has the capacity to listen to any of its child elements, or in the concept of event bubbling, a parent element is the surface of a drink in a glass, and the bubbles are the events traveling to the top.