On Mon, Apr 27, 2015 at 1:01 AM, Anne van Kesteren <ann...@annevk.nl> wrote:

> On Mon, Apr 27, 2015 at 9:25 AM, Justin Fagnani
> <justinfagn...@google.com> wrote:
> > I really don't think the platform needs to do anything to support
> > subclassing since it can be done so easily at the library level now that
> > multiple generations of shadow roots are gone. As long as a subclass and
> > base class can cooperate to produce a single shadow root with insertion
> > points, the platform doesn't need to know how they did it.
> So a) this is only if they cooperate

In reality, base and sub class are going to have to cooperate. There's no
style or dom isolation between the two anymore, and lifecycle callbacks,
templating, and data binding already make them pretty entangled.

> and the superclass does not want
> to keep its tree and distribution logic hidden

A separate hidden tree per class sounds very much like multiple generations
of shadow trees, and we just killed that... This is one of my concerns
about the inheritance part of the slots proposal: it appeared to give new
significance to <template> tags which essentially turn them into multiple
shadow roots, just without the style isolation.

> and b) if we want to
> eventually add declarative functionality we'll need to explain it
> somehow. Seems better that we know upfront how that will work.

I think this is a case where the frameworks would lead and the platform, if
it ever decided to, could integrate the best approach - much like data

I imagine that frameworks will create declarative forms of distribution and
template inheritance that work something like the current system, or the
slots proposal (or other template systems with inheritance like Jinja). I
don't even think a platform-based solution won't be any faster in the
common case because the frameworks can pre-compute the concrete template
(including distribution points and bindings) from the entire inheritance
hierarchy up front, and stamp out the same thing per instance.


> --
> https://annevankesteren.nl/

Reply via email to