W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2015

Re: Shadow DOM: state of the distribution API

From: Dimitri Glazkov <dglazkov@google.com>
Date: Wed, 6 May 2015 07:26:38 -0700
Message-ID: <CADh5Ky32uchYg8173fTEr0oZYnrgxr0B0+-=ns8caWjdK-SgNg@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: WebApps WG <public-webapps@w3.org>
On Wed, May 6, 2015 at 2:05 AM, Anne van Kesteren <annevk@annevk.nl> wrote:

> It seems we have three contenders for the distribution API.
> 1) Synchronous, no flattening of <content>. A host element's shadow
> tree has a set of slots each exposed as a single <content> element to
> the outside. Host elements nested inside that shadow tree can only
> reuse slots from the outermost host element.
> 2) Synchronous, flattening of <content>. Any host element nested
> inside a shadow tree can get anything that is being distributed.
> (Distributed <content> elements are unwrapped and not distributed
> as-is.)
> 3) Lazy. A distinct global (similar to the isolated Shadow DOM story)
> is responsible for distribution so it cannot observe when distribution
> actually happens.
> The argument for 1 is that there are no (good?) use cases for 2 and
> that descendants can be distributed, not just children. The argument
> for 2 is that it can be used to implement <content select> and
> <content slot> without much difficulty. The argument for 3 is that
> distribution is a layout concept (despite also impacting non-UI events
> and DOM APIs).
> (1/2 also require something akin "nanotask" mutation observers.)
> As I said elsewhere it's not clear to me we should couple DOM and
> layout. The composed tree is distinct from the render tree. It's also
> not clear to me what 3 would look like. No concrete proposal has been
> made. What is clear to me given the experience with service workers is
> that introducing a new global environment is not simple and would
> likely set us back another couple of years.
> That leaves 1/2 and although Ryosuke and Tab have taken sides, neither
> has really backed up their story. I tried to explore 1 in
> https://lists.w3.org/Archives/Public/public-webapps/2015AprJun/0474.html
> but that did not get much traction. So... trying again.

To complement this email, here's the in-depth (and work-in-progress)
discussion of this:
Received on Wednesday, 6 May 2015 14:27:06 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:31 UTC