The bubbles event property is used to return Boolean value that indicates whether an event is a bubbling event or not. It directs an event to its intended target. It works in the following ways:-
- When any object is clicked, an event is directed to that object.
- If an event handler is set for that object, the event handler will be triggered.
- Then the event bubbles up to the parent of the object.
- If an event handler is set for a parent, an event handler is also triggered.
- The event continues to bubble up until it reaches the top i.e, the document object.
For your Information:-
To stop such an event handler, we use the stopPropagation() method.
Its syntax is:- event.bubbles
Its return is:- true if an event is bubbling event else false