Indicates whether the given event bubbles up through the DOM or not.
event.bubbles
Returns a Boolean value, which is true
if the event bubbles up through the DOM.
var bool = event.bubbles;
bool
contains true
or false
, depending on whether the event can bubble or not.
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.
function goInput(e) { // checks bubbles and if (!e.bubbles) { // passes event along if it's not passItOn(e); } // already bubbling doOutput(e) }
Specification | Status | Comment |
---|---|---|
DOM The definition of 'Event.bubbles' in that specification. | Living Standard | |
DOM4 The definition of 'Event.bubbles' in that specification. | Working Draft | |
Document Object Model (DOM) Level 2 Events Specification The definition of 'Event.bubbles' in that specification. | Recommendation | Initial definition. |
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Event/bubbles