- From: Noam Rosenthal <notifications@github.com>
- Date: Wed, 19 Nov 2025 01:46:55 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 19 November 2025 09:46:59 UTC
noamr left a comment (WICG/webcomponents#1116)
> > current_content
> > <style marker=$lit3>current_styles</style>
> > ```
> > render(({v, c1, c2, content, styles}) => {
> > const lit1 = app_root.querySelector("[marker=$lit1]");
> > lit1.value = v;
> > const lit2 = app_root.querySelector("[marker=$lit2]");
> > lit2.setAttribute("class", `foo ${c1} ${c2}`);
> > lit2.replaceChildren(content);
> > const lit3 = app_root.querySelector("[marker=$lit3]");
> > lit3.replaceChildren(styles);
> > });
> > ```
>
> There is something missing in this example. From your code snippet, there's no indication of how the `marker` attributes track what part of the DOM should be updated. `marker="$lit1"` alone isn't enough information.
Right. In this example, that information is kept in the JS side of the library, or keep it in a `data-lit-*` attribute or whatever, or inside a comment node if that's what the library wants. What would be the value of the platform being opinionated about where that information is kept?
--
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/1116#issuecomment-3551786524
You are receiving this because you are subscribed to this thread.
Message ID: <WICG/webcomponents/issues/1116/3551786524@github.com>
Received on Wednesday, 19 November 2025 09:46:59 UTC