Closed nilzona closed 11 months ago
We have the same problem on page load.
It looks like the issue comes from the element already having a shadow root attached. It makes attachShadow
throw InvalidStateError exception.
I made a PR that just checks if it is already created, it seems to work fine but maybe I didn't take something into account.
We have the same problem
I am seeing the same error. @joeldenning, is there any chance we can get someone to look at this?
Seeing the same thing. Uncaught DOMException: Operation is not supported.
Happens at value:function(){this.shadow=this.attachShadow({mode:"open"})
Works fine in 2.4.2. Would be great to get this fixed seeing that it's around for some time. @joeldenning any way we could help here?
Same error here with version 3.0.0.
Any update on this?
Workaround until fixed:
<!-- <import-map-overrides-full show-when-local-storage="overrides-ui"></import-map-overrides-full> -->
<script>
const imo = document.createElement('import-map-overrides-full', { is: 'import-map-overrides-full' });
imo.setAttribute('show-when-local-storage', 'overrides-ui');
const attachShadowOriginal = imo.attachShadow;
imo.attachShadow = function (options) {
return this.shadowRoot ?? attachShadowOriginal.apply(this, [options]);
};
document.body.appendChild(imo);
</script>
@joeldenning , can you release v3.0.1 with a fix?
This has been released. Closing it.
In the new version 3 I'm getting the following console error
This shows up when I am using
single-spa-react
to render one react microfrontend on the page.Is there a way to avoid that? @ralphsaunders maybe you have an idea? It's most likely related to https://github.com/joeldenning/import-map-overrides/pull/65