- From: Alice <notifications@github.com>
- Date: Thu, 10 Jul 2025 06:37:11 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 10 July 2025 13:37:14 UTC
alice left a comment (whatwg/dom#1377) AIUI `source` in this instance would be the `<button>`, but the problem @keithamus describes would occur because the event would be propagated out of the shadow tree for that reason (as it would also be for a `composed` event), and the event would appear to be originating from the shadow host rather than the element it actually originates on. `referenceTarget` plays into this issue because it allows `<button>` to be the `source` for an event fired on an event inside shadow root even without manually firing the event as in Keith's example: ```html <button id=b popoverTarget=popoverA>Click me</button> <!-- even though popoverA has the popover attribute, b refers to popoverB --> <div id=popoverA popover> <template shadowrootmode=open shadowRootReferenceTarget=popoverB> <div id=popoverB popover> <!-- an event fired here appears to come from popoverA --> </div> </template> </div> ``` -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/pull/1377#issuecomment-3057491431 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/pull/1377/c3057491431@github.com>
Received on Thursday, 10 July 2025 13:37:14 UTC