W3C home > Mailing lists > Public > www-style@w3.org > April 2011

Re: Need a better way to reach into the shadow DOM subtree

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 11 Apr 2011 15:08:39 -0700
Message-ID: <4DA37BE7.7060804@mit.edu>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: Dimitri Glazkov <dglazkov@google.com>, "www-style@w3.org" <www-style@w3.org>
On 4/11/11 2:58 PM, Tab Atkins Jr. wrote:
> XBL exposes the shadow tree directly

I have no idea what you mean by that.

> 1. It makes the selector tree not match the source tree, without an
> explicit indication that something weird is going on.  Components
> should, in general, look like and act like normal elements, so that
> ordinary selectors act in expected ways.  (For example, "details>  p"
> should match the<p>  in "<details><p>foo</p></details>", even if the
> implementation puts a shadow wrapper around the contents.

That works today, in XBL1 and in the XBL2 proposals.  Have you actually 
tried this, or did you just assume things about the way those work that 
don't match reality?

> 2. It exposes the entire shadow tree.

_This_ I agree is a problem in current XBL1/2.  However, it seems like 
so does the '%' proposal.  And if it doesn't, then whatever restrictions 
that proposal is applying can apply just as easily to ' '.

So I still don't see the need for a new combinator here...

> (Hyatt already lodged a strong complaint against anything
> that selects into the raw shadow tree, rather than selecting from
> among a curated set of elements in the shadow.)

I have no problem with making ' ' do that.

Received on Monday, 11 April 2011 22:09:12 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:45 UTC