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

> Each custom element class needs to be designed with subclassing in mind. This is working as intended.

This is "working as intended" only because JavaScript doesn't have a "protected" feature. Many people want it. 

> opt in to be open for extensions which can manipulate internal state 

Using `protected` would count as opting into being open for extensions (by subclasses, while still blocking public access). It's a valid use case, and greatly simplifies class implementations. @bakkot's example is far too cumbersome.

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

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

Received on Thursday, 26 December 2024 23:53:08 UTC