stopPropagation
Summary
Prevents propagation of an event beyond the current target.
Syntax
event.stopPropagation();
Return Value
No return value
Usage
Use this method to stop event propagation in the capturing or bubbling event phase.
Notes
The event dispatches to all event listeners on the current target (regardless of capturing or bubbling) before the event flow stops. To completely prevent any remaining handlers from running, use the stopImmediatePropagation method instead.
Related specifications
- DOM Level 3 Events
- Working Draft
See also
Related pages
- SVGZoomEventSVGZoomEvent
- BeforeUnloadEventBeforeUnloadEvent
- CompositionEventCompositionEvent
- CustomEventCustomEvent
- DragEventDragEvent
- EventEvent
- FocusEventFocusEvent
- KeyboardEventKeyboardEvent
- MessageEventMessageEvent
- MouseEventMouseEvent
- MutationEventMutationEvent
- StorageEventStorageEvent
- TextEventTextEvent
- UIEventUIEvent
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]