W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

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

From: Dimitri Glazkov <dglazkov@chromium.org>
Date: Fri, 23 Dec 2011 10:00:20 -0800
Message-ID: <CADh5Ky0ipoXYSfDTp5MhZXWj8LCNBkFxMgz-vLnrScah8V1Tfg@mail.gmail.com>
To: Brian Kardell <bkardell@gmail.com>
Cc: "Edward O'Connor" <eoconnor@apple.com>, public-webapps@w3.org
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.


> 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

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