Re: [w3c/webcomponents] How to avoid memory leaks when detecting custom elements? (#674)

You can follow https://github.com/w3c/webcomponents/pull/405 and related topics there; e.g. https://github.com/w3c/webcomponents/wiki/Custom-Elements:-Contentious-Bits and https://lists.w3.org/Archives/Public/public-webapps/2015JulSep/0204.html

Supporting upgrading of custom elements was raised as a show stopper issue from Google, so we all compromised to have it.

In general though, once a custom element is registered with a global object, we can't really remove it retroactively since you can always instantiate the same custom element later, and it should work.

Note that the API I proposed in https://github.com/w3c/webcomponents/issues/671 should be able to determine whether a given element will be upgraded to a custom element or not. But again, we can't really avoid leaking the promise since there is never a guarantee that an element will never be upgraded since a new custom element definition can come in any time in the future.

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

Received on Tuesday, 10 October 2017 00:29:17 UTC