Junior From PDF JavaScript JavaScript

What is event bubbling and capturing?

When an event occurs in a nested element:

  • Bubbling: Event moves upward (child → parent).
  • Capturing: Event moves downward (parent → child).

Example:

element.addEventListener('click', handler, true); // capturing

element.addEventListener('click', handler, false); // bubbling

More from JavaScript Tutorial

All questions for this course
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details