Re: [webcomponents]: First draft of the Shadow DOM Specification

On Tue, Dec 20, 2011 at 4:49 PM, Edward O'Connor <eoconnor@apple.com> wrote:
> Hi Dimitri,
>
> You wrote:
>
>> In the joyous spirit of sharing, I present you with a first draft of
>> the Shadow DOM Specification:
>>
>> http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html
>
> Awesome. Thanks for writing this up! Obviously, I'll have to read this
> more closely while hiding upstairs at my in-law's house next week. That
> said, I wanted to quickly note something I noticed while skimming this
> just now.
>
> In your Event Retargeting Example[1], you have a pseudo="" attribute
> which allows the author of the shadow DOM to specify the name of a
> pseudo-element which will match that element. For example, in
>
>    <div id="player">
>      <shadow-boundary>
>        <div pseudo="controls">
>          …
>        </div>
>      </shadow-boundary>
>    </div>
>
> the web author would be able to select the player's controls by writing
>
>    #player::controls

Oooh, good catch. I actually haven't specified a method for addressing
shadow DOM elements in the subtree yet. That's bug
https://www.w3.org/Bugs/Public/show_bug.cgi?id=15196 (or thereabouts).
I need to rewrite the example to not use that plumbing (filed
https://www.w3.org/Bugs/Public/show_bug.cgi?id=15288).

>
> I'm worried that users may stomp all over the CSS WG's ability to mint
> future pseudo-element names. I'd rather use a functional syntax to
> distinguish between custom, user-defined pseudo-elements and
> engine-supplied, CSS WG-blessed ones. Something like
>
>    #player::shadow(controls)
> or
>    #player::custom(controls)

Yes, I like that. Need to talk with the CSS people and get this done.
There are also CSS Variables that could fit into this shape.

>
> could do the trick. The latter (or some other, non-shadow-DOM-specific
> name) is potentially more exciting because there may be more use cases
> for author-supplied pseudo-elements than just the shadow DOM. For
> instance, I could imagine an extension to DOM Range which would allow a
> user to name a range for selector matching.
>
> Anyway, thanks for the writeup, and have a wonderful break!

You're welcome! And everyone, please note that reading this spec is an
excellent excuse for hiding from your in-laws or getting out of that
annual Mall of America family shopping marathon.

:DG<

>
>
> Ted
>
> 1. http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#event-retargeting-example
>

Received on Wednesday, 21 December 2011 01:35:36 UTC