lit / lit/lit

[labs/ssr] Remove deprecated `shadowroot` attribute from emitted DSD

Open
#4,352 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Contributions Welcome Good First Issue
Dominant language
TypeScript
Stars
21.8k
Forks
1.1k
Avg merge
18h 25m
Merged PRs (30d)
2

Description

### Should this be an RFC?

- [X] This is not a substantial change

### Which package is this a feature request for?

SSR (@lit-labs/ssr)

### Description

Currently we include both the old `shadowroot` attribute and the new `shadowrootmode` attribute on `` elements of the generated DSD.

Chromium was the only one that was supporting the `shadowroot` attribute. It began shipping streaming DSD with the new `shadowrootmode` attribute in Chromium 111 along with Webkit early this year.
https://chromestatus.com/feature/5161240576393216
https://bugs.webkit.org/show_bug.cgi?id=249513

The non-standard `shadowroot` attribute has been marked deprecated since Chromium 112, to be removed in Chromium 119. https://chromestatus.com/feature/6239658726391808

The template shadowroot ponyfill was already updated to look for `shadowrootmode` instead of `shadowroot` here https://github.com/webcomponents/template-shadowroot/pull/43

### Alternatives and Workarounds

n/a

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the @lit-labs/ssr package and locate the code that emits DSD template attributes. Verify that generated DSD uses shadowrootmode without the deprecated shadowroot attribute; done means the SSR output matches that requirement.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.