Subscribe on changes!

能不能控制custom element(web component)自由开启shadow-root

avatar
Mar 28th 2023

What problem does this feature solve?

是这样的,在我们的项目里遇到了问题就是,我们是基于vue的web components方案项目,但是对于某些组件来说,我们不希望它拥有隔绝样式的能力。 所以是否可以新增自由控制是否开启shadow-root

What does the proposed API look like?

defineCustomElement({
  shadowRoot?: Boolen
})
avatar
Mar 28th 2023

can you help me?

avatar
Mar 30th 2023

I believe this is linked to #4404 and #4314 . It would be nice if this was merged, currently the only way to bypass it is a "fix" that breaks slots

avatar
May 11th 2023

Any update on this?