Re: [WICG/webcomponents] Cleaning up (undefining) custom elements? (#754)

Another use-case is with using micro-frontend architecture. We have a custom-elements library for visual components that is reused through many SPA. The library is integrated at build-time in the SPA, so each SPA can use a different version of the components. At runtime, the first spa that will load the custom-elements will define them and after that every other spa will use the custom-elements first registered even if they are incompatible. 

In this context, I would like to be able to unregister all custom-elements when the micro-frontend switch from one SPA to another. It would be useful for : 
   - memory efficiency
   - version control of the custom-elements running in the page

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/754#issuecomment-746961067

Received on Wednesday, 16 December 2020 20:27:59 UTC