- From: Justin Fagnani <justinfagnani@google.com>
- Date: Mon, 27 Apr 2015 01:23:41 -0700
- To: Anne van Kesteren <annevk@annevk.nl>
- Cc: Ryosuke Niwa <rniwa@apple.com>, WebApps WG <public-webapps@w3.org>, Erik Bryn <erik@erikbryn.com>, Dimitri Glazkov <dglazkov@google.com>
- Message-ID: <CAEKsHmCKHZasiB6ndJG-sO_gcCPQQuiDwVqjf1rXaPT6_xTPCQ@mail.gmail.com>
On Mon, Apr 27, 2015 at 1:01 AM, Anne van Kesteren <annevk@annevk.nl> wrote: > On Mon, Apr 27, 2015 at 9:25 AM, Justin Fagnani > <justinfagnani@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 binding. 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. Cheers, Justin > > -- > https://annevankesteren.nl/ >
Received on Monday, 27 April 2015 08:24:29 UTC