- From: Adam Barth <w3c@adambarth.com>
- Date: Wed, 2 Jul 2014 08:45:23 -0700
- To: Ryosuke Niwa <rniwa@apple.com>
- Cc: Boris Zbarsky <bzbarsky@mit.edu>, WebApps WG <public-webapps@w3.org>, Maciej Stachowiak <mjs@apple.com>
On Wed, Jul 2, 2014 at 8:15 AM, Ryosuke Niwa <rniwa@apple.com> wrote: > 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? That's the general idea, but there are some more details. Take a look at how UserAgentShadowRoot is used in Blink if you want to get some idea of what's required: https://code.google.com/p/chromium/codesearch#search/&q=UserAgentShadowRoot&sq=package:chromium&type=cs >> 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. Yes, the hundreds of messages on this topic demonstrates that's the case. :) > 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. W3C culture doesn't place as much emphasis on running code as IETF culture does, for example, but, for topics, the best way to understand them is to try writing some code. > Having said that, gaining implementation experience is definitely valuable, and I look forward to hearing what you find out with your work. Thanks! Adam
Received on Wednesday, 2 July 2014 15:46:22 UTC