[whatwg] Drag-and-drop feedback

On Mon, 12 Oct 2009, Garrett Smith wrote:
> On Mon, Oct 12, 2009 at 4:37 AM, Ian Hickson <ian at hixie.ch> wrote:
> > On Sun, 11 Oct 2009, Garrett Smith wrote:
> >>
> >> My question is:
> >> Which browser does document.initDragEvent work in?
> >
> > Do you mean DragEvent.initDragEvent?
> 
> AH, yeah. The event is under "MouseEvent", then? So:-
> 
> document.createEvent("MouseEvents");

It's a DragEvent, so you have to do:

   document.createEvent("DragEvent");


> >> Document.initDragEvent is inordinately long and cumbersome, taking 16 
> >> arguments, and requiring the creation of a DataTransfer object. That 
> >> seems extremely cumbersome just to get a drag event to fire. This 
> >> method doesn't seem to be implemented anywhere FWICT. Was it copied 
> >> from an existing implementation? It seems to have been an invention. 
> >> But whose?
> >
> > It's just the usual way things are done for events. I'll follow 
> > whatever DOM3 Events says to do.
> 
> Sorry, but I don't see how that answers my questions. It seems it was 
> not copied from existing implementations, but was instead an invention.
> 
> Who wrote that API?

The DragEvent interface is new in HTML5, but it uses the same conventions 
as all interfaces that inherit from Event.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 12 October 2009 18:47:35 UTC