Re: XBL2: First Thoughts and Use Cases

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:;%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.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 15 December 2010 21:18:31 UTC