Re: XBL2: First Thoughts and Use Cases

On Wed, Dec 15, 2010 at 1:18 PM, Ian Hickson <ian@hixie.ch> wrote:
> On Tue, 14 Dec 2010, Boris Zbarsky wrote:
>>
>> So that in this case there would be a span element in the shadow DOM and
>> a different span element in the flattened tree?
>
> As XBL2 is specced currently, the nodes in the explicit DOM and in the
> shadow DOM are the same nodes as in the final flattened tree, except that
> certain elements in the shadow tree don't appear in the final flattened
> tree (the root <template> and the insertion point <content> elements, in
> particular; also the element used for inheritance insertion).
>
> The example in this section, while initially rather perplexing, is
> probably the quickest way of visualising this:
>
>   http://dev.w3.org/cvsweb/~checkout~/2006/xbl2/Overview.html?content-type=text/html;%20charset=utf-8#the-final-flattened-tree
>
> The key is just that each element in the final flattened tree is _also_ in
> a DOM somewhere. It's the same elements, they just have two sets of tree
> pointers (parent, children, siblings, etc). Selectors and events work in
> XBL2 as specified work on a carefully chosen hybrid of these trees.

As far as I know (and I've been in the center of the discussions over
here, so hopefully I know pretty far), we agree with this design in
XBL2.  We have some nits to pick with precisely how shadows are
constructed and flattened, but otherwise, yeah, basically the same
deal.

~TJ

Received on Wednesday, 15 December 2010 21:25:54 UTC