- From: Ben Howell <notifications@github.com>
- Date: Thu, 08 Aug 2024 10:46:21 -0700
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 8 August 2024 17:46:24 UTC
@Westbrook > What happens in the time between setting the `referenceTarget`, via either technique, and that element actual existing due to the `innerHTML` being set? Should we talk about that in any way? That's implicitly covered by the fact that reference target is a [Live Reference](https://github.com/WICG/webcomponents/blob/gh-pages/proposals/reference-target-explainer.md#live-references). Basically, the reference target gets updated any time something changes in the DOM that affects it. For example adding elements to the shadow DOM tree by setting `innerHTML` will update the reference target. It's equivalent to the non-shadow-dom case: if you have `<label for="foo">...</label>` and then _later_ add `<input id="foo">` to the DOM, the label will be "updated" to be for the input. That said, it might be worth expanding the Live References section to include mentions of the DOM changing, instead of only mentioning the referenceTarget changing. I can make that change in a separate PR. -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/pull/1062#issuecomment-2276351481 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/pull/1062/c2276351481@github.com>
Received on Thursday, 8 August 2024 17:46:24 UTC