-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat: allow passing ShadowRootInit to custom element shadow options
#17088
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 8d32602 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
|
Thank you. What's the purpose of allowing a function to be passed? What can you do that way that you can't do without the function? |
|
I think I added that in case the configuration logic would need to be more complex. But now I can't think of any scenarios where you would need more than just the object with some ternary operators. So it could be removed I guess. |
Closes #17080
Allows you to change all options of
ShadowRootInitwhen creating custom elements.shadowoption entirely.shadow: 'open'.shadow: 'none'.ShadowRootInitobject, so that you can change all the settings of shadow root:ShadowRootInitobject:Before submitting the PR, please make sure you do the following
feat:,fix:,chore:, ordocs:.packages/svelte/src, add a changeset (npx changeset).Tests and linting
pnpm testand lint the project withpnpm lint