Re: [webcomponents]: First draft of the Shadow DOM Specification

On Fri, Dec 23, 2011 at 5:23 AM, Brian Kardell <bkardell@gmail.com> wrote:
> In your example, you lost me on this part:
>
> // Insert Bob's shadow tree under the election story box.
> root.appendChild(document.createElement('shadow'));
>
> Is that wrong?  If not, can you explain it?

Sure. Since Alice's shadow DOM subtree is added later than Bob's, his
tree is older than hers. The way shadow insertion point works, it
looks for an older tree in the tree stack, hosted by the <ul> element.
In this case, the older tree is Bob's. Thus, Bob's entire shadow DOM
tree is inserted in place of the <shadow> element. Does that make more
sense? What can I do to improve the example? A diagram perhaps? Please
file a bug with ideas.

> also... How does this patter
> give browsers timely enough information to avoid fouc?  It feels like there
> is a piece missing..

In this particular case, since both Bob and Alice use
DOMContentLoaded, FOUC is not an issue. The first paint will occur
after the shadow subtrees are in place.

:DG<

>
> On Dec 22, 2011 8:16 PM, "Brian Kardell" <bkardell@gmail.com> wrote:
>>
>> Quick note :  That is the single best draft prose I have ever read :)
>>
>> On Dec 22, 2011 6:56 PM, "Dimitri Glazkov" <dglazkov@chromium.org> wrote:
>>>
>>> BTW, added an example:
>>>
>>> dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#shadow-dom-example
>>>
>>> :DG<

Received on Friday, 23 December 2011 18:00:48 UTC