Which package(s) are affected?
SSR (@lit-labs/ssr)
Description
Server rendering a <textarea> with a binding in property/attribute/element position results in a comment node being added inside the textarea content, which is rendered as plain text rather than being parsed as an HTML comment.
Reported by user Levi in Discord thread: https://discord.com/channels/1012791295170859069/1073542653402157076
Reproduction
When server-rendering the following template using @lit-labs/ssr:
renderInput(id: string) {
return html`<textarea name="${id}"></textarea>`;
}
A comment node shows up inside the textarea:
<textarea id="name"><!--lit-node 0--></textarea>
Workaround
Avoid binding to the textarea node.
Is this a regression?
No or unsure. This never worked, or I haven't tried before.
Affected versions
@lit-labs/ssr 3.0.1
Browser/OS/Node environment
Any