[whatwg] [selectors4] drag-and-drop pseudo-classes

Ryosuke Niwa rniwa at webkit.org
Tue Aug 14 13:11:19 PDT 2012


On Tue, Aug 14, 2012 at 12:53 PM, Tab Atkins Jr. <jackalmage at gmail.com>wrote:

> On Tue, Aug 14, 2012 at 12:13 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:
> > I'm asking how we're supposed to implement this pseudo-classes given that
> > the only way to know whether an element can receive the item is by firing
> > dragenter and/or dragover events. e.g.
>
> No, we can know it declaratively via the dropzone attribute.  That's
> what these will key off of in HTML.  In @dropzone, you can declare the
> types of data that it will accept, and you know the type of the data
> as soon as the drag starts, so you have all the info you need.
>

Okay, thanks for the clarification.

We obviously can't address "dropzones" that are only detectable during
> the dragover event.  That's fine - they just won't respond to these
> pseudo-classes.  Consider it an inducement to use the new, better
> model that @dropzone allows.
>

I'm not sure if I'm a big fun of that idea given that I haven't seen people
using dropzone attribute in wild. Have other browser vendors even
implemented it yet? (We haven't prefixed it in WebKit) All in all, I feel
like it's premature to build more features on top of it.

- Ryosuke



More information about the whatwg mailing list