Re: [WICG/webcomponents] Reference Target: How to handle events fired on the reference target by related elements? (Issue #1098)

alice left a comment (WICG/webcomponents#1098)

I think one "solution" worth exploring might be whether `popoverTarget` is worth [scoping out](https://github.com/WICG/webcomponents/issues/1091) of reference target behaviour. I think you could potentially make a reasonable case that authors would expect it to apply to the shadow host even when the shadow host has a reference target: if I have some kind of `<fancy-thing>` which includes `<thing>` with a bunch of extra elements for presentation/information/etc, I probably wouldn't expect only `<thing>` to show up as the popover.

I'm even less sure about `commandFor`, but I think a similar argument might apply?

I agree with Jake that if they _are_ scoped in, we should try to avoid requiring authors to do extra work to make these events work reasonably.

I think either way, it might be worth considering what plausible scenarios there are for how `popoverTarget` and `commandFor` might end up referring to a shadow host with a reference target; I'm having trouble imagining how that might eventuate, which makes it difficult to reason about what a good solution might be.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/1098#issuecomment-2781806050
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/1098/2781806050@github.com>

Received on Monday, 7 April 2025 01:23:47 UTC