spectrum-web-components
spectrum-web-components copied to clipboard
[Feat]: Introducing scoped registries in spectrum web components
Code of conduct
- [X] I agree to follow this project's code of conduct.
Impacted component(s)
Base component
Description of the requested feature
This relates to https://github.com/adobe/spectrum-web-components/discussions/3636 discussion for scoped registries.
Adding in support for Scoped Custom Element registries by using the polyfill to enable component libraries to have components defined in the local scope to avoid version mismatch conflicts. This helps in faster development and removes the host dependencies for ace-components.
Mockups or screenshots
Below screen shot is for scoped action bar implementation which has elements defined in its local scope.
Implementation notes or ideas
For Implementing it a npm package like @lit-labs/scoped-registry-mixin could be used which creates scoped registry for the class & also passes the registry to attachShadow().
Possibly of interest: https://github.com/webcomponents/polyfills/issues/568