W3cubDocs

/Haxe JavaScript

DataTransferItem

package js.html

Available on js

The DataTransferItem object represents 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.

Documentation DataTransferItem by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See also:

Variables

read onlykind:String

The kind of drag data item, string or file.

read onlytype:String

The drag data item's type, typically a MIME type.

Methods

getAsFile():File

Returns the File object associated with the drag data item (or null if the drag item is not a file).

Throws:

null

DOMError

getAsString(callback:String ‑> Void):Void

Invokes the specified callback with the drag data item string as its argument.

Throws:

null

DOMError

© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/DataTransferItem.html