bubbles event property

Definition and Usage

The bubbles event property returns a boolean value indicating whether the event is a bubbling event.

Event bubbling directs the event to its expected target, working as follows:

  • Click the button and direct the event to the button
  • If an event handler is set for the object, the event is triggered
  • If no event handler is set for the object, the event will bubble up (like bubbles in water) to the parent object
  • Events bubble up from the parent to the parent until they are handled, or until they reach the document object.

Example

figure out whether a specific event canBubble:

var x = event.bubbles;

try it yourself

syntax

event.bubbles

Technical Details

Return Value:

Boolean value indicating whether the specified event is a bubbling event.

Possible Values:

  • true - Event can bubble through DOM
  • false - Event does not bubble
DOM Version: DOM Level 2 Events

Browser Support

The numbers in the table indicate the first browser version that fully supports the property.

Properties Chrome IE Firefox Safari Opera
bubbles Support 9.0 Support Support Support