[Bug 18429] [Shadow]: Specify imperative API for node distribution

https://www.w3.org/Bugs/Public/show_bug.cgi?id=18429

--- Comment #2 from Dimitri Glazkov <dglazkov@chromium.org> ---
There's an API proposed on
http://lists.w3.org/Archives/Public/public-webapps/2014JanMar/0376.html. It
needs a small tweak to play nice with distributions.

Distributions are necessary to maintain composability properties of Shadow DOM.
Since it might be hard for a newcomer to reconstruct the whole picture from
emails and bug comments, I took a bit of time to document it here:
https://gist.github.com/dglazkov/e8402f9ab18ad7ef2e7d

tl;dr: distributions are a requirement for Shadow DOM. They are here to stay,
because without them, Shadow DOM is just a fun theoretical exercise.

The tweak is minor: the add/remove methods populate a pool of candidates. We
then hook processing this pool into pool population algorithm
(http://w3c.github.io/webcomponents/spec/shadow/#dfn-pool-population-algorithm),
modulo additional integrity checks (tbd). Even better, make this pool of
candidates an Array.

This eliminates both the problem with the original proposal, and makes the
recently proposed API work with distributions.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 7 March 2014 18:39:48 UTC