[whatwg/dom] [DRAFT] Propagate events into the event's source's tree where appropriate. (PR #1377)

When an event is triggered by a source in a different tree from the target, propagate events into the source's tree
(where appropriate) so that event listeners can be added in that tree without needing to have access into the
target's tree.

- Add the concept of a "source" for an Event.
- Modify shadow root's "get the parent" algorithm such that events propagate into the event's source's tree where appropriate.

See https://github.com/WICG/webcomponents/issues/1098 for more information and worked examples.

- [ ] At least two implementers are interested (and none opposed):
   * …
- [ ] [Tests](https://github.com/web-platform-tests/wpt) are written and can be reviewed and commented upon at:
   * Some tests are added in https://chromium-review.googlesource.com/c/chromium/src/+/6490687 (also a WIP), but more are needed.
- [ ] [Implementation bugs](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) are filed:
   * Chromium: …
   * Gecko: …
   * WebKit: …
   * Deno (only for aborting and events): …
   * Node.js (only for aborting and events): …
- [ ] [MDN issue](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) is filed: …
- [ ] The top of this comment includes a [clear commit message](https://github.com/whatwg/meta/blob/main/COMMITTING.md) to use.


<!--
    This comment and the below content is programmatically generated.
    You may add a comma-separated list of anchors you'd like a
    direct link to below (e.g. #idl-serializers, #idl-sequence):

    Don't remove this comment or modify anything below this line.
    If you don't want a preview generated for this pull request,
    just replace the whole of this comment's content by "no preview"
    and remove what's below.
-->
***
<a href="https://whatpr.org/dom/1377.html" title="Last updated on Jun 3, 2025, 9:25 AM UTC (ec59294)">Preview</a> | <a href="https://whatpr.org/dom/1377/388779b...ec59294.html" title="Last updated on Jun 3, 2025, 9:25 AM UTC (ec59294)">Diff</a>
You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/dom/pull/1377

-- Commit Summary --

  * Propagate events into the event's source's tree where appropriate.

-- File Changes --

    M dom.bs (23)

-- Patch Links --

https://github.com/whatwg/dom/pull/1377.patch
https://github.com/whatwg/dom/pull/1377.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1377
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/pull/1377@github.com>

Received on Tuesday, 3 June 2025 09:26:03 UTC