Re: Fallout of non-encapsulated shadow trees

> On May 15, 2014, at 6:17 AM, Anne van Kesteren <annevk@annevk.nl> wrote:
> 
> I'm still trying to grasp the philosophy behind shadow trees.
> Sometimes it's explained as "exposing the primitives" but the more I
> learn (rather slowly, this time at BlinkOn) the more it looks like a
> bunch of new primitives.
> 
> We cannot explain <input> still, but since we allow going inside the
> shadow tree we now see the need for a composed tree walker (a way to
> iterate over a tree including its non-encapsulated interleaved shadow
> trees). In addition we see the need for a composed range of sorts, so
> selection across boundaries makes sense. Neither of these are really
> needed to explain bits of the existing platform.

I agree with the need for encapsulation in Web Components and have been arguing for it for a long time. Currently, despite agreement dating back several years, it doesn’t even offer a mode with better encapsulation. Now that the non-encapsulation version has shipped in Chrome, it may be hard to change other than by renaming everything.

Web Components as currently designed cannot explain the behavior of any built-in elements (except maybe those which can be explained with CSS alone).

Regards,
Maciej

Received on Tuesday, 1 July 2014 02:25:21 UTC