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

Re: [webcomponents]: Making Shadow DOM Subtrees Traversable

From: Scott González <scott.gonzalez@gmail.com>
Date: Thu, 7 Mar 2013 11:51:17 -0500
Message-ID: <CAO8i3idqWo2HtVgo5b+Ffv1G9=Dnrk5=PKrs9CemW0=fkACd0Q@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Rafael Weinstein <rafaelw@google.com>, Dominic Cooney <dominicc@chromium.org>, "Tab Atkins Jr." <jackalmage@gmail.com>, Dimitri Glazkov <dglazkov@chromium.org>, public-webapps <public-webapps@w3.org>, Elliott Sprehn <esprehn@gmail.com>, Yehuda Katz <wycats@gmail.com>
On Wed, Mar 6, 2013 at 3:00 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 3/6/13 1:31 PM, Scott González wrote:
>
>> but we feel the pros of exposing internals outweigh the cons.
>>
>
> When you say "exposing internals" here, which one of the following do you
> mean:
>
> 1)  Exposing internals always.
> 2)  Exposing internals by default, with a way to opt into not exposing.
> 3)  Not exposing internals by default, with a way to opt into exposing.
>

I was replying in the context of jQuery, in which we expose most internals
always. There is no option to have jQuery hide it's internals.


> And what do you feel the pros are of whichever one you're talking about
> compared to the items after it on the list, just so we're on the same page?


In terms of web components, I'm not sure I (or anyone else on the jQuery
team) have too strong of an opinion on the default. However, I can say that
I find it extremely annoying that I can't reach into the Shadow DOM for new
input types and just kill everything. I want <input type="date"> to render
as <input type="text"> because native HTML will likely never be as flexible
as custom JS components. Obviously I'd prefer a standard, and web
components are supposed to solve this. But in the meantime, we're provided
with useful semantics and validation that go unused if you want the
flexibility of a JS date picker.

As someone building JS components, I see the benefit of having the
internals exposed to me so I can do as I please. I also recognize the pain
of maintaining code that reaches into internals. As someone who cares about
the future of the web, I see the very real danger of this becoming
widespread and ending up in the situation Boris wants us to avoid.
Received on Thursday, 7 March 2013 16:51:44 GMT

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