What is Event Capturing in Javascript ?

In the capturing phase, the browser checks to see if the element's outer-most ancestor () has an onclick event handler registered on it during the capturing phase, and runs it if so.

Then it moves on to the next element inside and does the same thing, then the next one, and so on until it reaches the element that was actually clicked on.

The capturing phase is not often used. Usually it is invisible to us.



You May Interest

What are the Variable Naming Conventions in JavaScript ?

What are Different Javascript Frameworks ?

JavaScript How To Find The Average Of 10 Numbers Using A While Lo ...

JavaScript Taking the Square Root of a Number

What is this Keyword in Javascript ?