Event: bubbles property - Web APIs | MDN (original) (raw)

Baseline

Widely available

Note: This feature is available in Web Workers.

The bubbles read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.

**Note:**See Event bubbling for more information on bubbling.

Value

A boolean value, which is true if the event bubbles up through the DOM tree.

Example

function handleInput(e) {
  // Check whether the event bubbles passes the event along
  if (!e.bubbles) {
    passItOn(e);
  }

  // Already bubbling
  doOutput(e);
}

Specifications

Specification
DOM # ref-for-dom-event-bubbles③

Browser compatibility

See also