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

DataTransferItem

One drag data item. During a drag operation, each drag event has a dataTransfer property which contains a list of drag data items. Each item in the list is a DataTransferItem object.

interface DataTransferItem {
readonly kind: string;
readonly type: string;
getAsFile(): File | null;
getAsString(callback: FunctionStringCallback | null): void;
webkitGetAsEntry(): FileSystemEntry | null;
}
var DataTransferItem: {
prototype: DataTransferItem;
}
;

§Properties

§
readonly kind: string
[src]

Returns the drag data item kind, one of: "string", "file".

§
readonly type: string
[src]

Returns the drag data item type string.

§Methods

§
getAsFile(): File | null
[src]

Returns a File object, if the drag data item kind is File.

§
getAsString(callback: FunctionStringCallback | null): void
[src]

Invokes the callback with the string data as the argument, if the drag data item kind is text.

§
webkitGetAsEntry(): FileSystemEntry | null
[src]