feat(): add forceShadowDom config option - this will disable scoped fallback in IE
Hi all,
this might not be the cleanest solution as I guess there's a lot of code being shipped for the scoped fallback even though you disable using it, but it's a quick fix and works together with @webcomponents/webcomponentsjs.
Related to #2012 and various other IE issues that exist using the scoped fallback.
Yes, please! Do you need any help so that we could get this merged in?
Actually I'm not sure if this PR has a real value as you could just "dirty hack" Stencil into ShadowDom mode by doing this before your component bundle loads:
if (!document.documentElement.attachShadow) {
document.documentElement.attachShadow = true;
}
That way the Stencil ShadowDom check will pass and you'll be able to try the webcomponent polyfills for shadow: true components.
To make this an actual feature of Stencil it would be cleaner to actually remove the "scoped fallback code" (I'm not sure what exactly this includes) from the bundle if forceShadowDom: true.
I apologize that someone on the team never responded to this PR. Since its original creation, Stencil has dropped support for IE (as of Stencil v4). As a result, we no longer support browsers that do not support shadow DOM. I'm going to close this out, but wanted to thank you for putting for the effort here and again apologize for the lack of response here. If you have any questions, please feel free to reach out.