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<