현재 번역은 완벽하지 않습니다. 한국어로 문서 번역에 동참해주세요.

Event.cancelBubble 속성은 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
DOM
The definition of 'cancellBubble' in that specification.
Living Standard  

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

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.

문서 태그 및 공헌자

이 페이지의 공헌자: pouu69
최종 변경: pouu69,