Medallia interview question

Javascript events: stopPropagation & stopImmediatePropagation

Interview Answer

Anonymous

26 May 2016

`stopPropagation` prevents the event from propagating to its parents. Say you have registered a `click` event listener to the `body` element, then clicking any other element in the DOM would also trigger this event. `stopImmediatePropagation` is very much like `stopPropagation` except it also prevents other registered event handlers on the same element to fire.