DataTransferItemList
js.html.DataTransferItemList (extern class)
The DataTransferItemList
object is a list of DataTransferItem
objects representing items being dragged. During a drag operation, each DragEvent
has a dataTransfer
property and that property is a DataTransferItemList
.
Documentation DataTransferItemList by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See:
Instance Members
length: Int
An unsigned long
that is the number of drag items in the list.
add(data: File): DataTransferItem
Adds an item (either a File
object or a DOMString
) to the drag item list and returns a DataTransferItem
object for the new item.
Name | Type |
---|---|
data |
File |
Returns |
---|
DataTransferItem |
Removes the drag item from the list at the given index.
Name | Type |
---|---|
index |
Int |
clear(): Void
Removes all of the drag items from the list.