Render a Lit TemplateResult to an HTML string, emitting Declarative
Shadow DOM markup for every Custom Element it contains.
The synchronous variant (collectResultSync) is documented to
throw when the underlying render emits async iterables — which
happens whenever a component uses until, asyncReplace, or
similar async directives. The built-in <sc-*> elements never do
this, so the synchronous path is safe for the default use.
Consumer widgets that introduce async behaviour must use the
streaming SSR API directly (out of scope for this entry).
Parameters
template: TemplateResult
The Lit template to render.
Returns string
The rendered HTML string with Declarative Shadow DOM
markup.
Render a Lit
TemplateResultto an HTML string, emitting Declarative Shadow DOM markup for every Custom Element it contains.The synchronous variant (
collectResultSync) is documented to throw when the underlying render emits async iterables — which happens whenever a component usesuntil,asyncReplace, or similar async directives. The built-in<sc-*>elements never do this, so the synchronous path is safe for the default use. Consumer widgets that introduce async behaviour must use the streaming SSR API directly (out of scope for this entry).