Skip to content

DataTransferItemList

Types

t

type t = private {length: int}

Record fields

length
int

Returns the number of items in the drag data store. Read more on MDN

Values

add

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. Read more on MDN

let add: (
t,
~data: string,
~type_: string,
) => Null.t<WebAPI.DataTransferItem.t>

Parameters

~data: string
~type_: string

Return type

Null.t<WebAPI.DataTransferItem.t>

addFile

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. Read more on MDN

let addFile: (t, WebAPI.DOM.file) => Null.t<WebAPI.DataTransferItem.t>

Parameters

Return type

Null.t<WebAPI.DataTransferItem.t>

clear

Removes all the entries in the drag data store. Read more on MDN

let clear: t => unit

Parameters

Return type

unit

remove

Removes the indexth entry in the drag data store. Read more on MDN

let remove: (t, int) => unit

Parameters

int

Return type

unit