이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 참여해서 번역을 마치도록 도와 주세요!
English (US)의 문서도 읽어보세요.

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

Note: See Event bubbling and capture for more information on bubbling.

Syntax

var doesItBubble = event.bubbles;

Value

A Boolean, which is true if the event bubbles up through the DOM.

Example

function handleInput(e) {
  // Checks whether the event bubbles and ...
  if (!e.bubbles) {
    // ... passes the event along if does not
    passItOn(e);
  }

  // Already bubbling
  doOutput(e);
}

Note: 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.

Specifications

Specification Status Comment
DOM
The definition of 'Event.bubbles' in that specification.
Living Standard  
Document Object Model (DOM) Level 2 Events Specification
The definition of 'Event.bubbles' in that specification.
Obsolete Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome Full support YesEdge ? Firefox ? IE ? Opera Full support YesSafari ? WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android ? Opera Android Full support YesSafari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown

See also

  • stopPropagation() to stop bubbling the event
  • stopImmediatePropagation() to not call any further listeners for the same event at the same level in the DOM
  • preventDefault() to allow propagation to continue but to disallow the browser to perform its default action should no listeners handle the event