[webkit-dev] Shadow DOM API (first iteration) ready for landing

Alex Russell slightlyoff at chromium.org
Wed Jun 29 07:08:15 PDT 2011

On Wed, Jun 29, 2011 at 5:01 AM, Geoffrey Garen <ggaren at apple.com> wrote:

> On Jun 28, 2011, at 5:15 PM, Dimitri Glazkov wrote:
> > On Tue, Jun 28, 2011 at 4:49 PM, Geoffrey Garen <ggaren at apple.com>
> wrote:
> >> Hi Dmitri.
> >>
> >>> Since this is an experimental API, here are the actual API names we
> want to use:
> >>>
> >>> Element.webkitShadow
> >>> Element.webkitPseudo
> >>> document.webkitCreateShadow()
> >>> window.WebKitShadowRootConstructor
> >>> window.WebKitTreeScopeConstructor
> >>
> >> Even though we've been using "shadow" as a term in our internal
> development, I think it makes a bad API name, since it's vague to its
> purpose, and it conflicts with the existing meaning of "shadow" on the web,
> which is a color radiating around a visual element.
> >
> > I sympathize and agree that there's a naming collision, but I think
> > the train has left the station on this one. "Shadow tree" and "shadow
> > content" are terms that have been used pretty much universally to
> > describe this construct, from XBL/XUL and XBL2 to SVG. I don't think
> > we need to invent a new name for it.
> Fair enough.
> How about using "shadow tree" or "shadow content" consistently instead of
> just "shadow"? I can imagine "webkitShadow" meaning a lot of different
> things. "webkitShadowTree" or "webkitShadowContent" seems clearer.

This falls into the broad bucket of things that webdevs are exposed to that
tend to be unnecessarily long ("querySelectorAll" vs. "query") for no good
reason. Meaning comes with use. My bias as a webdev is to want the shortest
thing that means something close. In particular, since you'll be scripting
through this property a LOT, having it be short is a serious win.

With those preferences, is there something we can do that's better *and*
shorter than "shadow"?

> Element.webkitShadowTree
> Element.webkitPseudo // not sure what this is -- showing my ignorance
> document.webkitCreateShadowTree()
> window.WebKitShadowTreeConstructor // all trees begin at a root, right?
> window.WebKitShadowTreeScopeConstructor // assuming this can only be used
> inside the shadow tree
> Geoff
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110629/d2feeebb/attachment.html>

More information about the webkit-dev mailing list