> On Apr 30, 2015, at 5:12 AM, Anne van Kesteren <ann...@annevk.nl> wrote:
> On Mon, Apr 27, 2015 at 11:05 PM, Ryosuke Niwa <rn...@apple.com> wrote:
>>> The other thing I would like to explore is what an API would look like
>>> that does the subclassing as well.
>> For the slot approach, we can model the act of filling a slot as if 
>> attaching a shadow root to the slot and the slot content going into the 
>> shadow DOM for both content distribution and filling of slots by subclasses.
>> Now we can do this in either of the following two strategies:
>> 1. Superclass wants to see a list of slot contents from subclasses.
>> 2. Each subclass "overrides" previous distribution done by superclass by 
>> inspecting insertion points in the shadow DOM and modifying them as needed.
> With the existence of closed shadow trees, it seems like you'd want to
> allow for the superclass to not have to share its details with the
> subclass.

Neither approach needs to expose internals of superclass' shadow DOM.  In 1, 
what superclass seems is a list of proxies of slot contents subclasses 
provided.  In 2, what subclass sees is a list of wrappers of overridable 
insertion points superclass defined.

I can't think of an inheritance model in any programming language in which 
overridable pieces are unknown to subclasses.

- R. Niwa

Reply via email to