INTRODUCING DRAG AND DROP IN HTML5

The mouse has always been one of the easiest user interface tools to learn how to use; you just point and click. Unfortunately, some mouse interaction also has been one of the hardest features to support directly in JavaScript, such as identifying what the user is pointing at and which button was clicked. For a long time, websites were forced to instruct the browser as to what the user could click, where it was, and what it did. Anything that did not involve a single left click was overly complicated and inconsistent across browsers.

Eventually, direct mouse detection and control was offered in 2000 with the W3C DOM Level 2 MouseEvent object, but not all browsers adopted it properly. This led to cross-browser ...

Get HTML5: Your visual blueprint™ for designing rich web pages and applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.