Re: Fallout of non-encapsulated shadow trees

On Jul 2, 2014, at 8:07 AM, Adam Barth <w3c@adambarth.com> wrote:

> On Tue, Jul 1, 2014 at 8:52 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>> On 7/1/14, 9:13 PM, Brendan Eich wrote:
>>> Are you sure? Because Gecko has used XBL (1) to implement, e.g., <input
>>> type=file>, or so my aging memory says.
>> 
>> We use XBL to implement <marquee>.
> 
> I'm working on using web components to implement <marquee> in Blink:
> 
> https://github.com/abarth/marquee
> 
> I've studied the XBL implementation of <marquee> in Gecko, and it does
> leak some implementation details.  As a simple example,
> alert(document.createElement('marquee')) in Firefox says "[object
> HTMLDivElement]" because the XBL implementation uses a div.
> 
> The approach I'm using is roughly the one outlined by Maciej in [1].
> The most challenging aspect by far is isolating the script interface
> inside and outside the component.
> 
> If you ignore script isolation, we already know that the current
> design of shadow DOM can provide isolation by twiddling some internal
> bits because we use shadow DOM in the engine to implement <details>,
> <keygen>, <video>, <progress>, and several other elements.  We could
> expose an API to authors that would let them twiddle those same bits,
> but I'm not sure we should do that without providing script isolation
> of some form.

By "twiddling some internal bits", not exposing the said shadow roots on the element?

> My sense from following this discussion is that there's been a lot of
> talking about this subject and not very much coding.  Hopefully I'll
> learn something interesting by writing code that I can report back to
> this group.

I don't think we necessarily have to code anything in order to have a discussion in this mailing list.  Correct me if I'm wrong but neither WebApps WG nor W3C has any sort of policy to mandate that we need to create a polyfill or prototype in order to write a working draft for example as far as I know.

Having said that, gaining implementation experience is definitely valuable, and I look forward to hearing what you find out with your work.

- R. Niwa

Received on Wednesday, 2 July 2014 15:15:59 UTC