bubbles Event Property
Definition and Usage
The bubbles event property returns a Boolean value that indicates whether or not an event is a bubbling event.
Event bubbling directs an event to its intended target, and works like this:
- When an object (like a button) is clicked, an event is directed to the object.
- If an event handler is set for the object, the event handler is triggered.
- Then the event bubbles up (like a bubble in water) to the objects parent.
- If an event handler is set for the parent, this event handler is also triggered.
- The event continues to bubble up, until it reaches the top (the document object).
- Bubbling only stops if an event handler use the stopPropagation() method.
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
bubbles | Yes | 9.0 | Yes | Yes | Yes |
Syntax
event.bubbles
Technical Details
Return Value: | A Boolean, indicating whether the specified event is a bubbling event.
Possible values:
|
---|---|
DOM Version: | DOM Level 2 Events |