The DataTransferItem
object represents one drag data item. During a drag operation, each DragEvent
has a dataTransfer
property which contains a list
of drag data items. Each item in the list is a DataTransferItem
object.
DataTransferItem
was primarily designed for the HTML Drag and Drop API, and is still specified in the HTML drag-and-drop section, but it is now also used by other APIs, such as ClipboardEvent.clipboardData
and InputEvent.dataTransfer
. Documentation of DataTransferItem
will primarily discuss its usage in drag-and-drop operations, and you should refer to the other APIs' documentation for usage of DataTransferItem
in those contexts.
This interface has no constructor.