stencil icon indicating copy to clipboard operation
stencil copied to clipboard

feat(): add forceShadowDom config option - this will disable scoped fallback in IE

Open schadenn opened this issue 6 years ago • 2 comments

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.

schadenn avatar Nov 22 '19 09:11 schadenn

Yes, please! Do you need any help so that we could get this merged in?

arielsalminen avatar Dec 09 '19 18:12 arielsalminen

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.

schadenn avatar Dec 13 '19 10:12 schadenn

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.

rwaskiewicz avatar Nov 29 '23 21:11 rwaskiewicz