- From: Mason Freed <notifications@github.com>
- Date: Wed, 19 Aug 2020 15:21:08 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 19 August 2020 22:21:20 UTC
Ahh great - I didn't realize the opt-out got implemented after all. Thanks for the pointers. So elements can easily opt out of internals, or call `attachInternals()` in the constructor to prevent leakage of the shadowRoot. I do agree with the @rniwa / @bathos example - `attachInternals()` can be called by someone else between the call to `define()` and the element actually being upgraded. That's not great. Is there any problem with @rniwa's suggestion here? > Now that I'm thinking about this problem more, perhaps the easiest solution is to forbid ElementInternals to be created unless the underlying element's custom element state is "custom". This forces custom element's constructor to be the very first thing to have the ability to call attachInternals. This seems like it would fix the above problem. -- 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/871#issuecomment-676763363
Received on Wednesday, 19 August 2020 22:21:20 UTC