Skip to content

Bubbling and Capturing in JavaScript #8866

@subhangi2731

Description

@subhangi2731

Description

The bubbling principle is simple.

When an event happens on an element, it first runs the handlers on it, then on its parent, then all the way up on other ancestors.

Let’s say we have 3 nested elements FORM > DIV > P with a handler on each of them:

Domain

Frontend Dev HTML/CSS/JS

Type of Contribution

Documentation

Code of Conduct

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions