Live data from Hacker News

Drag and Drop with HTML5 (plus source code)

blog.zenbe.com

1–4 of 4 posts

Re: Drag and Drop with HTML5 (plus source code)

#2
here's the direct link to the sourcecode for the DropManager class extracted from our work on this feature.

http://gist.github.com/153019

from the docs... The DropManager class provides a pleasant API for observing HTML5 drag-n-drop events, cleaning up the data that they return, and triggering the appropriate callbacks. With the drag and drop API so far, there are generally three types of data we're interested in: HTML, URLs, and plain text. On drop, your callback will receive a pre-processed drop object with corresponding 'url', 'html' and 'text' properties.