Re: [WICG/webcomponents] [element-internals] How to get internals in base class and subclass, without leaking it to public (Issue #962)

> @keithamus But in your example, if a subclass of the base class doesn't need the internals (not all end subclasses may need them) then your example leaves the extra call available for the public.

Right. My example just works around the error condition of calling attachInternals twice while preserving it for later callsites. It doesn't attempt to fix the issue of outside access.

If you know you don't want others to have access to internals and you don't want to call attachInternals yourself, you can disable it during element registration using `disabledFeatures` which means it won't be available for public (or just call it in your constructor anyway). 

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

Message ID: <WICG/webcomponents/issues/962/1198694745@github.com>

Received on Thursday, 28 July 2022 22:36:02 UTC