Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[labs/ssr] FallbackRenderer incorrectly creates a shadow root #3587

@justinfagnani

Description

@justinfagnani

Which package(s) are affected?

SSR (@lit-labs/ssr)

Description

When an element is defined, but doesn't match a renderer, we use the FallbackRenderer. This includes a renderShadow() method, which causes the lit-html renderer to emit a <template shadowroot="open"> element, which in turn causes a hydration error.

Since lit-html's SSR render checks for the existence of renderShadow() to determine if a shadow rot should be emitted, either FallbackRenderer should not implement renderShadow(), and/or we should have a more explicit sign to render a shadow root.

Reproduction

Register an element, but don't use the LitElementRenderer.

Workaround

n/a

Is this a regression?

No or unsure. This never worked, or I haven't tried before.

Affected versions

all

Browser/OS/Node environment

all

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions