Web/API/Event/stopPropagation

From Get docs
< Web/API‎ | Event


The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases. It does not, however, prevent any default behaviors from occurring; for instance, clicks on links are still processed. If you want to stop those behaviors, see the preventDefault() method.

Syntax

event.stopPropagation();

Parameters

None.

Return value

undefined.

Examples

See Example 5: Event Propagation in the Examples chapter for a more detailed example of this method and event propagation in the DOM.

Specifications

Specification Status Comment
DOMThe definition of 'Event.stopPropagation()' in that specification. Living Standard
DOM4The definition of 'Event.stopPropagation()' in that specification. Obsolete
Document Object Model (DOM) Level 2 Events SpecificationThe definition of 'Event.stopPropagation()' in that specification. Obsolete Initial definition

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
stopPropagation Chrome

Full support 1

Edge

Full support 12

Firefox

Full support 1

IE

Full support 9

Opera

Full support 7

Safari

Full support 1

WebView Android

Full support 1

Chrome Android

Full support 18

Firefox Android

Full support 4

Opera Android

Full support 10.1

Safari iOS

Full support 1

Samsung Internet Android

Full support 1.0

Legend

Full support  
Full support


See also