Event: bubbles property
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
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
js
function handleInput(e) {
// Check whether the event bubbles passes the event along
if (!e.bubbles) {
passItOn(e);
}
// Already bubbling
doOutput(e);
}
Specifications
Specification |
---|
DOM Standard # ref-for-dom-event-bubbles③ |
Browser compatibility
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bubbles |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
See also
stopPropagation()
to prevent further propagation of the current event in the capturing and bubbling phasesstopImmediatePropagation()
to not call any further listeners for the same event at the same level in the DOMpreventDefault()
to allow propagation to continue but to disallow the browser to perform its default action should no listeners handle the event