Cancel bubbling of an event

If you’ve set ‘cancelable’ to true in your event dispatch call, you can call

e.stopPropagation();

To stop the event in its bubbling track at the first listener. Good if you’ve got a CLOSE event for example, and want the first parent who can handle closing things to close it rather than higher great-grandaddy clips.

Tech Reference:

Leave a Reply

Your email address will not be published. Required fields are marked *

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑