Wednesday, 20 August 2014

Javascript event capturing and bubbling

JavaScript uses two models for event delegation, capturing and bubbling. If you go back in old days, Netscape said that event on parent will take place first and Microsoft said that event on target element will take first. The W3C model combines both capturing and bubbling by saying that an event first makes its way downwards visiting captures i.e parent to target child and then bubbles back visiting non captures. Lets explore further