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

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

From: Anne van Kesteren <annevk@opera.com>
Date: Fri, 24 Feb 2012 11:11:23 +0100
Message-ID: <op.v96g89so64w2qv@annevk-macbookpro.local>
On Fri, 24 Feb 2012 02:38:08 +0100, Daniel Cheng <dcheng at chromium.org>  
wrote:
> 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:
> http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-domstringlist
>
> 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.

Yes lets do this!

I also filed

https://www.w3.org/Bugs/Public/show_bug.cgi?id=16102
https://www.w3.org/Bugs/Public/show_bug.cgi?id=16103

to get it removed from Microdata and Indexed DB. The only remaining user  
of DOMStringList is CSSOM (Document.styleSheetSets) to my knowledge and I  
think that can be changed still too (not implemented everywhere yet). If  
that's done DOMStringList can be moved to the historical section of the  
DOM (aka the graveyard).


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Friday, 24 February 2012 02:11:23 UTC

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