W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2012

[whatwg] Changing the type of event.dataTransfer.types

From: Daniel Cheng <dcheng@chromium.org>
Date: Thu, 23 Feb 2012 17:38:08 -0800
Message-ID: <CAF3XrKqfGZvK1srVMmpA2HrLBEx773qCU4Q=w_M_y573p0Czwg@mail.gmail.com>
For a long time, WebKit returned types as an Array rather than a
DOMStringList. I fixed this recently, but arv pointed out that
DOMStringList is deprecated in favor of Array:

Given that, wouldn't it make sense to change event.dataTransfer.types to be
a live Array instead of a live DOMStringList? It's not needed for legacy
compatibility with IE, which didn't have .types. It was implemented
differently in Gecko and WebKit, so pages ought to be checking for this
already with:
if (event.dataTransfer.contains) {
} else if (event.dataTransfer.indexOf) {
As a result, the burden of such a change to well-behaved web developers
should be minimal.

Received on Thursday, 23 February 2012 17:38:08 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:40 UTC