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

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

From: Travis Leithead <travis.leithead@microsoft.com>
Date: Sat, 25 Apr 2015 17:49:00 +0000
To: Ryosuke Niwa <rniwa@apple.com>, Anne van Kesteren <annevk@annevk.nl>
CC: WebApps WG <public-webapps@w3.org>, Erik Bryn <erik@erikbryn.com>, "Dimitri Glazkov" <dglazkov@google.com>
Message-ID: <BLUPR03MB389B926A405CA251FEC0313F8EB0@BLUPR03MB389.namprd03.prod.outlook.com>
Nice work folks, and thanks for writing this up so quickly! Anne's Gist captured exactly what I was thinking this would look like.

One nit: it would be nice if the callback could be registered from _inside_ the shadowRoot, but I couldn't come up with a satisfactory way to do that without adding more complexity. :)

-----Original Message-----
From: Ryosuke Niwa [mailto:rniwa@apple.com] 
Sent: Saturday, April 25, 2015 10:13 AM
To: Anne van Kesteren
Cc: WebApps WG; Erik Bryn; Dimitri Glazkov
Subject: Re: Imperative API for Node Distribution in Shadow DOM (Revisited)


> On Apr 25, 2015, at 9:28 AM, Anne van Kesteren <annevk@annevk.nl> wrote:
> 
>> On Sat, Apr 25, 2015 at 12:17 AM, Ryosuke Niwa <rniwa@apple.com> wrote:
>> In today's F2F, I've got an action item to come up with a concrete workable
>> proposal for imperative API.  I had a great chat about this afterwards with
>> various people who attended F2F and here's a summary.  I'll continue to work
>> with Dimitri & Erik to work out details in the coming months (our deadline
>> is July 13th).
>> 
>> https://gist.github.com/rniwa/2f14588926e1a11c65d3
> 
> I thought we came up with something somewhat simpler that didn't
> require adding an event or adding remove() for that matter:

That's the second approach I mentioned.  Like I mentioned in the gist, this model assumes that redistribution is done by UA and only direct children can be distributed.  I realized that those constraints are no longer necessary given we don't have content select or multiple generations of shadow DOM.

>  https://gist.github.com/annevk/e9e61801fcfb251389ef
> 
> I added an example there that shows how you could implement <content
> select>, it's rather trivial with the matches() API. I think you can
> derive any other use case easily from that example, though I'm willing
> to help guide people through others if it is unclear. I guess we might
> still want positional insertion as a convenience though the above
> seems to be all you need primitive-wise.
> 
> 
> -- 
> https://annevankesteren.nl/
> 
Received on Saturday, 25 April 2015 17:49:31 UTC

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