Hosting Solutions
mobile_logo Table of Contents


The DataTransfer object is used to assign and read data that is transferred during drag and drop operations.


dropEffect - controls the drag-and-drop feedback that the user is given during a drag-and-drop operation. Value provided can be "none", "copy", "link", or "move". effectAllowed - Returns the kinds of operations that are to be allowed or can be set to change the allowed operations. The possible values are "none", "copy", "copyLink", "copyMove", "link", "linkMove", "move", "all", and "uninitialized". files - Returns a FileList of the files being dragged, if any. items - Returns a DataTransferItems object associated with the DataTransfer object. The same object must be returned each time. types - Returns a DOMStringList listing the formats that were set in the dragstart event. In addition, if any files are being dragged, then one of the types will be the string "Files".


addElement() - Adds the given element to the list of elements used to render the drag feedback. clearData() - Removes the data of the specified formats. Removes all data if the argument is omitted. getData() - Returns the specified data. If there is no such data, returns the empty string. setData() - Adds the specified data. setDragImage() - Uses the given element to update the drag feedback, replacing any previously specified feedback.