bubbles
Event Property
Definition and Usage
The bubbles
event property returns a Boolean value. It returns true
if the event is of a bubbling type, otherwise it returns false
.
Event bubbling is divided into three phases, which are as follows:
First, the capture phase. The event is passed from the Document object down the document tree to the target node. If any ancestor of the target has specifically registered a capturing event handler, these handlers run during the event propagation.
The second phase occurs at the target node itself. The event handlers directly registered on the target that are suitable will run. This is similar to the event handling method provided by the Level 0 event model.
Third, the bubbling phase. In this phase, the event will propagate upwards from the target element back to the Document object's hierarchy.
Syntax
Example
Example
The following example checks if the occurred event is a bubbling event: