Summary

Indicates whether the given event bubbles up through the DOM or not.

Syntax

event.bubbles

Returns a Boolean value, which is true if the event bubbles up through the DOM.

Example

var bool = event.bubbles;

bool contains true or false, depending on whether the event can bubble or not.

Notes

Only certain events can bubble. Events that do bubble have this property set to true. You can use this property to check if an event is allowed to bubble or not.

Example

 function goInput(e) {
  // checks bubbles and
  if (!e.bubbles) {
     // passes event along if it's not
     passItOn(e); 
  }
  // already bubbling
  doOutput(e)
}

 

Document Tags and Contributors

Last updated by: Sheppy,