W3C home > Mailing lists > Public > www-style@w3.org > February 2014

Re: Encapsulation and defaulting to open vs closed (was Re: Shadow DOM Encapsulation)

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 6 Feb 2014 17:28:09 -0800
Message-ID: <CAAWBYDD_57asHOPAB1Ly22y_v0maK4T9A=9fjtFds1QCpEygqg@mail.gmail.com>
To: Maciej Stachowiak <mjs@apple.com>
Cc: www-style list <www-style@w3.org>
On Thu, Feb 6, 2014 at 4:22 PM, Maciej Stachowiak <mjs@apple.com> wrote:
> That seems clearly false. If shadow DOM is subject to Type 2 encapsulation by default, the author can always opt out to Type 1. Even if we don't provide a feature for it, component authors can always do something to expose the shadow DOM themselves. However, there is no way to build Type 2 on top of Type 1. That is why I think defaulting to Type 1 and providing only Type 1 is a mistake. We can't have any experiments for whether Type 2 would be sufficiently useful and beneficial because you can't do it.
>
> This actually makes Type 2 the more fundamental primitive! You can't build it on top of Type 1. Am I allowed to cite http://extensiblewebmanifesto.org at this point?

Of course it's possible to build Type 2 on top of Type 1 - just delete
or override the .shadowRoot accessor from the element.

(Just to head off a potential objection - yes, other script can
preempt you on this and retain access.  Just like I argued before, and
you've acknowledged, solving that is an orthogonal problem.)

~TJ
Received on Friday, 7 February 2014 01:28:57 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:18 UTC