Interface DataTransferItemList
interface DataTransferItemList {
length: number;
[iterator](): ArrayIterator<DataTransferItem>;
add(data: string, type: string): DataTransferItem;
add(data: File): DataTransferItem;
clear(): void;
remove(index: number): void;
[index: number]: DataTransferItem;
}
length: number;
[iterator](): ArrayIterator<DataTransferItem>;
add(data: string, type: string): DataTransferItem;
add(data: File): DataTransferItem;
clear(): void;
remove(index: number): void;
[index: number]: DataTransferItem;
}
Indexable
Index
Properties
Methods
Methods
[iterator]
- [iterator](): ArrayIterator<DataTransferItem>
Returns ArrayIterator<DataTransferItem>
add
- add(data, type): DataTransferItem
Adds a new entry for the given data to the drag data store. If the data is plain text then a type string has to be provided also.
Parameters
- data: string
- type: string
Returns DataTransferItem
- add(data): DataTransferItem
Parameters
- data: File
Returns DataTransferItem
Returns the number of items in the drag data store.
MDN Reference