---
title: "Discussion on \"JavaScript event handling: stopPropagation vs stopImmediatePropagation\" | Hashnode"
description: "Discussion on \"JavaScript event handling: stopPropagation vs stopImmediatePropagation\". In JavaScript, when any event like a click or mouse-over occurs on a dom element, it goes through the capturing and bubbling phases.\nConsider the following code:\n<!-- eventHandlingExample.html -->\n<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <title>..."
url: "https://hashnode.com/posts/javascript-event-handling-stoppropagation-vs-stopimmediatepropagation/63cfcfca33a735137ae458d5"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [JavaScript event handling: stopPropagation vs stopImmediatePropagation](https://aritrakoley.hashnode.dev/javascript-event-handling-stoppropagation-vs-stopimmediatepropagation?utm_source=hashnode&utm_medium=feed)

In JavaScript, when any event like a click or mouse-over occurs on a dom element, it goes through the capturing and bubbling phases. Consider the following code: <!-- eventHandlingExample.html --> <!DOCTYPE html> <html lang="en"> <head> <title>...

Jan 24, 2023 · 4 min read · aritrakoley.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#event-listener](https://hashnode.com/tag/event-listener)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#wemakedevs](https://hashnode.com/tag/wemakedevs)
-   [#development](https://hashnode.com/tag/development)

## Written by

[Aritra Koley](https://hashnode.com/@Koleyteral)

@Koleyteral

  
[View profile](https://hashnode.com/@Koleyteral)

Software Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
