- From: Ryan Christian <notifications@github.com>
- Date: Tue, 08 Jul 2025 05:15:51 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/issues/958/3048684339@github.com>
rschristian left a comment (whatwg/dom#958) To add another use case: jQuery and React both have `.isPropagationStopped` and `.isImmediatePropagationStopped` properties upon some (all?) of their events. The former is quite easy to spoof, as mentioned, but the latter is trickier. For a concrete example of where this is done: Preact, a React-like UI lib, spoofs the former property in order to maintain compatibility where possible with the React ecosystem whilst still using native events ([1](https://github.com/preactjs/preact/blob/2d6811de49ec4b4d6c0820cebf5cfcc4442f2af1/compat/src/render.js#L102), [2](https://github.com/preactjs/preact/blob/2d6811de49ec4b4d6c0820cebf5cfcc4442f2af1/compat/src/render.js#L109-L111)). Unfortunately there are a number of React component libraries these days that make use of `.isImmediatePropagationStopped`, and without a native property to observe & mirror, we have to ask users to start patching their component libraries. Not asking the world by any means but it is something some users are uncomfortable with. Whilst fairly niche, offering something here would open up some more compatibility & migration paths for those who've built component libraries and the like expecting the ability to observe if `.stopImmediatePropagation()` has been called. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/958#issuecomment-3048684339 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/issues/958/3048684339@github.com>
Received on Tuesday, 8 July 2025 12:15:55 UTC