W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2013

Re: [webcomponents]: Making Shadow DOM Subtrees Traversable

From: Dimitri Glazkov <dglazkov@chromium.org>
Date: Wed, 6 Mar 2013 09:50:37 -0800
Message-ID: <CADh5Ky2uQKOw1do5R=qKxLTuOHwiB3_E452vrfRPSue1mPdejA@mail.gmail.com>
To: Blake Kaplan <mrbkap@gmail.com>
Cc: Erik Arvidsson <arv@google.com>, "Tab Atkins, Jr." <jackalmage@gmail.com>, Boris Zbarsky <bzbarsky@mit.edu>, public-webapps <public-webapps@w3.org>, Dominic Cooney <dominicc@chromium.org>, Elliott Sprehn <esprehn@gmail.com>
On Tue, Feb 26, 2013 at 1:43 PM, Blake Kaplan <mrbkap@gmail.com> wrote:

> On Tue, Feb 26, 2013 at 11:05 AM, Erik Arvidsson <arv@google.com> wrote:
> > Also, if shadows are public by default the API to access the shadow is
> well
> > defined. If shadows are private by default and components decide to
> expose
> > the shadow ad hoc then there is no standardized API.
>
> This doesn't have to be the case. Shadows can be private by default
> with a well defined and consistent API to override the default.
>

So, here's a quick strawman:

1) add an optional parameter to createShadowRoot to indicate whether the
shadow tree will be public or private (default TBD)
2) when a shadow tree is private, the corresponding HTMLElement.shadowRoot
and HTMLShadowElement.olderShadowRoot return either a) the next older
public tree root or b) null if older tree doesn't exist, effectively
skipping from the private shadow tree over to the next older public tree.

WDYT?

If this is okay with everyone, we can focus on debating the default
parameter value.

:DG<
Received on Wednesday, 6 March 2013 17:51:09 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:57 GMT