Re: [webcomponents]: Making Shadow DOM Subtrees Traversable

On Thu, Mar 7, 2013 at 9:55 AM, Bronislav Klučka <> wrote:

> ...
> I do not mean to sound cocky here, but I'd really like to know how many
> people here are used to languages that can separate internals and
> externals, because if you are simply not used to it, you simply cannot see
> the benefits and all goes to "I'm used to play with internals of controls",

I think you'll find everyone in this discussion has used a wide variety of
systems from XUL to Cocoa to Swing to MFC and many more.

I think it's important to note that all these native platforms support
walking the hierarchy as well.

Cocoa has [NSView subviews], Windows has FindWindowEx/EnumChildWindows,
Swing has getComponents(), ...

I'm struggling to think of a widely used UI platform that _doesn't_ give
you access. Sure, there's encapsulation, Shadow DOM that has too, but they
all still give you an accessor to get down into the components.

> From my JS/HTML control experience?
> * I want all my tables to look certain way - boom jQury datepicker brokes
> down, tinyMCE brokes down
> * I want all my tables to have and option for exporting data - boom jQury
> datepicker brokes down, tinyMCE brokes down
> * I switch from content-box to border-box - pretty much every 3rd party
> control breaks down
> * I want to autogenerate table of contents (page menu links) from headings
> in the article, f*ck, some stupid plugin gets involved
> that's like the last week experience
> ...

Private shadows are not necessary to address any if the issues you cite.
Indeed all of these issues are already fixed with the current design by way
of scoped styles, resetting style inheritance, and shadows being separate
trees you don't accidentally fall into.

I think this is really the compelling argument. We solved the major issues
already, and none of the other very successful platforms (ex. Cocoa,
Android, etc.) needs to be so heavy handed as to prevent you from walking
the tree if you choose.

- E

Received on Thursday, 7 March 2013 18:59:22 UTC