Re: [WICG/webcomponents] Reference Target: Should the `form` and `list` JavaScript attributes return the host element? (Issue #1072)

dandclark left a comment (WICG/webcomponents#1072)

This was discussed during the [Feb 14 meeting](https://github.com/WICG/webcomponents/issues/1083#issuecomment-2660170704):

> Dan Clark: interesting question brought up by Ben, about reflecting attributes, that reflect IDREF, like `form`, and this is interesting in the reference target case, because we have a form association, where the form is in the shadow DOM, and now this is possible because of reference target. There is a question about what the `form` attribute should be though. We don’t want to expose the `form` (that should be hidden in the shadow DOM). Alternatively we could expose the `host`, but that feels unexpected. Potentially it would be `null`? I feel like this is something we should try the host option, and re-evaluate after getting feedback. 
Westbrook: a good number of people from the community group have discussed in the issue here. It does feel like `null` is a dead-end, where returning the host has the ability to work with the component author.
Olli: what happens when you change the id of the form, so it is not there anymore, what will happen? Will it start to return null.
Dan: yeah, it will return null, which is why returning host feels valuable, so you can tell when that has been disconnected.
Dan: it sounds like there aren’t issues here, and there is a rough consensus on using host, so are we good to close this?
Westbrook: I think closing this is fine

There appeared be consensus there, and in the comments on this issue, that changing the IDL types and returning the host is the right way to go. Closing this issue with that conclusion.

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

Message ID: <WICG/webcomponents/issues/1072/2691804719@github.com>

Received on Saturday, 1 March 2025 01:11:25 UTC