[whatwg] HTML 5 drag and drop feedback

On Aug 30, 2009, at 7:46 PM, Ian Hickson wrote:

> On Sat, 22 Aug 2009, Francisco Tolmasky wrote:
>
> Thanks.
>
> The big thing to realise about this API is that it isn't young -- it's
> what IE has shipped for about 10 years, and what Safari has had for  
> a bit
> less than that.
>
> We should definitely extend the API going forward, but I'd rather wait
> until the browsers implement this set of features reliably before  
> adding
> more features.
>
> -- 
> Ian Hickson               U+1047E                ) 
> \._.,--....,'``.    fL
> http://ln.hixie.ch/       U+263A                /,   _.. \   _ 
> \  ;`._ ,.
> Things that are impossible just take longer.   `._.-(,_..'-- 
> (,_..'`-.;.'

I can certainly see the logic behind this, and admittedly my second  
request (explicitly starting drags) may be particularly difficult to  
add without changing the spec too much. I will continue to think if  
there is some trickery that can be done with this.

However, I think the addition of the deferred setData methods could be  
added today in a way that is completely backwards compatible with  
current implementations and would still be of great benefit.  
Specifically, my request for deferring the calling of toString on non- 
string objects as such:

event.dataTransfer.setData("something", { toString: function()  
{ return expensiveFunctionCall(); } });

This would allow me to submit patches to Firefox and WebKit that would  
solve the current performance issues which are literally blocking my  
ability to switch from "fake" drag and drop to "native" drag and drop.  
At the same time, this should still work today in all browsers that  
implement setData because the object is coerced into a string  
immediately for you, thus not requiring immediate action on their part  
to change anything.

Thanks,

Francisco

Received on Thursday, 3 September 2009 18:05:54 UTC