Skip to content

DataTransferItem

Types

t

type t = private {kind: string, @as("type") type_: string}

Record fields

kind
string

Returns the drag data item kind, one of: "string", "file". Read more on MDN

type_
string

Returns the drag data item type string. Read more on MDN

Values

getAsFile

Returns a WebApiFile object, if the drag data item kind is File. Read more on MDN

let getAsFile: t => Null.t<WebAPI.DOM.file>

Parameters

Return type

Null.t<WebAPI.DOM.file>

getAsString

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

let getAsString: (t, string => unit) => unit

Parameters

(string) => unit

Return type

unit

webkitGetAsEntry

let webkitGetAsEntry: t => Null.t<
WebAPI.FileAndDirectoryEntriesTypes.fileSystemEntry,
>

Parameters

Return type

Null.t<WebAPI.FileAndDirectoryEntriesTypes.fileSystemEntry>