Javascript libraries

Javascript global functions

Javascript/HTML event can be handled by more than one dom elements and after one handler, it propagate to next element. API Event.stopPropagation() can be used to stop propagation of an event. It is best to avoid using stopProgation API as there might be other libraries on page which can get affected by this. In addition it is error prone.

Here is an example on how to use stop propagation. Here outer and two inner divs are listening to click event. One For inner1 div, we are using stopPropagation. So we we click on inner1 div, event is not propagated to outer div.