Re: Imperative API for Node Distribution in Shadow DOM (Revisited)

> On Apr 29, 2015, at 4:15 PM, Dimitri Glazkov <dglazkov@google.com> wrote:
> 
> On Mon, Apr 27, 2015 at 8:48 PM, Ryosuke Niwa <rniwa@apple.com> wrote:
>> One thing that worries me about the `distribute` callback approach (a.k.a. Anne's approach) is that it bakes distribution algorithm into the platform without us having thoroughly studied how subclassing will be done upfront.
>> 
>> Mozilla tried to solve this problem with XBS, and they seem to think what they have isn't really great. Google has spent multiple years working on this problem but they come around to say their solution, multiple generations of shadow DOM, may not be as great as they thought it would be. Given that, I'm quite terrified of making the same mistake in spec'ing how distribution works and later regretting it.
> 
> At least the way I understand it, multiple shadow roots per element and distributions are largely orthogonal bits of machinery that solve largely orthogonal problems.

Sorry, I wasn't clear about my point.  I'm specifically talking about re-distributions.

It would be great if you or someone working on Polymer could point me to an example of a concrete use case for redistributions that come up in a nested shadow DOM.  As far as I looked around, I couldn't find any use case for which selective re-distribution; i.e. the case in which an outer shadow DOM's insertion point needs to filter nodes distributed into an inner shadow DOM's insertion point.

- R. Niwa

Received on Wednesday, 29 April 2015 23:42:38 UTC