The Event.cancelBubble property is a historical alias to Event.stopPropagation(). Setting its value to true before returning from an event handler prevents propagation of the event.


event.cancelBubble = bool;
var bool = event.cancelBubble;


elem.onclick = function(e) {
 // do cool things here
  e.cancelBubble = true;


Specification Status Comment
The definition of 'cancellBubble' in that specification.
Living Standard  

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) 53 (53)[1] (Yes) (Yes) (Yes)
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) 53 (53)[1] (Yes) (Yes) (Yes)

[1] Previous to Firefox 53, this property was defined on the UIEvent interface. See bug 1298970 for more details.

Document Tags and Contributors

 Contributors to this page: chrisdavidmills, erikadoyle, cvrebert
 Last updated by: chrisdavidmills,