Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

DataTransferItemList

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.

interface DataTransferItemList {
[index: number]: DataTransferItem;
readonly length: number;
[[Symbol.iterator]](): IterableIterator<DataTransferItem>;
add(data: string, type: string): DataTransferItem | null;
add(data: File): DataTransferItem | null;
clear(): void;
remove(index: number): void;
}
var DataTransferItemList: {};

§Index Signatures

§
[index: number]: DataTransferItem

§Properties

§
readonly length: number
[src]

Returns the number of items in the drag data store.

§Methods

§
[[Symbol.iterator]](): IterableIterator<DataTransferItem>
[src]
§
add(data: string, type: string): DataTransferItem | null
[src]

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.

§
add(data: File): DataTransferItem | null
[src]
§
clear(): void
[src]

Removes all the entries in the drag data store.

§
remove(index: number): void
[src]

Removes the indexth entry in the drag data store.