Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shadowRootOptions for more easily customizing shadowRoot #1147

Closed
sorvell opened this issue Feb 3, 2021 · 0 comments · Fixed by #1148
Closed

Add shadowRootOptions for more easily customizing shadowRoot #1147

sorvell opened this issue Feb 3, 2021 · 0 comments · Fixed by #1148

Comments

@sorvell
Copy link
Member

sorvell commented Feb 3, 2021

Description

For forward compatibility will the next version of LitElement, static shadowRootOptions should be added. This is a slightly easier way to customize the renderRoot.

Instead of:

createRenderRoot() {
  return this.attachShadow({mode: 'open', delegatesFocus: true});
}

users can just do:

static shadowRootOptions: {mode: 'open', delegatesFocus: true};

Acceptance criteria

PR landed with feature.

@sorvell sorvell self-assigned this Feb 3, 2021
sorvell pushed a commit that referenced this issue Feb 4, 2021
This is a slightly simpler alternative for customizing shadow root options than implementing `createRenderRoot`. Fixes #1147.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant