--- title: Event.cancelBubble slug: Web/API/Event/cancelBubble translation_of: Web/API/Event/cancelBubble ---

{{APIRef("DOM Events")}}

Event.cancelBubble 속성은 {{domxref("Event.stopPropagation()")}}의 별칭입니다. 이벤트 핸들러에서 반환되기 전에 값을 true로 설정하면 이벤트가 전파되지 않습니다.

Syntax

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

Example

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

Specifications

Specification Status Comment
{{SpecName('DOM WHATWG', '#dom-event-cancelbubble', 'cancellBubble')}} {{Spec2('DOM WHATWG')}}  

Browser compatibility

{{CompatibilityTable}}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{CompatVersionUnknown}} {{CompatGeckoDesktop(53)}}[1] {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{CompatVersionUnknown}} {{CompatGeckoDesktop(53)}}[1] {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}

[1] Previous to Firefox 53, this property was defined on the {{domxref("UIEvent")}} interface. See {{bug(1298970)}} for more details.