lwc icon indicating copy to clipboard operation
lwc copied to clipboard

Multiple Off-Platform LWC's on one page

Open ReichPhilipp opened this issue 3 weeks ago • 9 comments

Hey team,

I have been working on the problem that I want to remove a LWC from the DOM and then add another LWC. This is causing me some problems with the syntheticShadowDom. In the screenshot you can see that the previous component is used when searching for the parentNode.

Screenshot 2024-06-25 at 14 18 18

Idea is to: load LWC1 -> Do something -> Unload LWC1 -> load LWC2 -> Do Something -> Unload LWC2 -> ...

Projectsetup:

i try to integrate the Off-Platform LWC's in an angular application. which works fine for single LWC.

Remove the LWC from DOM doesnt work. Looks like that the synthetic shadowdom is still there. How can i remove a LWC from a page?

I am quite desperate and have no further ideas

Thanks

Kind regards Philipp

image

ReichPhilipp avatar Jun 25 '24 12:06 ReichPhilipp