Event.cancelBubble
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.