Data Transfer Object
The Data Transfer Object
dataTransfer . dropEffect [ = value ]
Returns the kind of operation that is currently selected. If the kind of operation isn’t one of those that is allowed by the effectAllowed attribute, then the operation will fail.
Can be set, to change the selected operation.
The possible values are “none”, “copy”, “link”, and “move”.
dataTransfer . effectAllowed [ = value ]
Returns the kinds of operations that are to be allowed.
Can be set, to change the allowed operations.
The possible values are “none”, “copy”, “copyLink”, “copyMove”, “link”, “linkMove”, “move”, “all”, and “uninitialized”,
dataTransfer . items
Returns a DataTransferItems object, with the drag data.
dataTransfer . setDragImage (element, x, y)
Uses the given element to update the drag feedback, replacing any previously specified feedback.
dataTransfer . addElement (element)
Adds the given element to the list of elements used to render the drag feedback.
dataTransfer . 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”.
data = dataTransfer . getData (format)
Returns the specified data. If there is no such data, returns the empty string.
dataTransfer . setData (format, data)
Adds the specified data.
dataTransfer . clearData ( [ format ] )
Removes the data of the specified formats. Removes all data if the argument is omitted.
dataTransfer . files
Returns a FileList of the files being dragged, if any.
