Skip to content

DataTransferItemList

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: (
UiEventsTypes.dataTransferItemList,
~data: string,
~type_: string,
) => UiEventsTypes.dataTransferItem

Parameters

UiEventsTypes.dataTransferItemList string string

Return type

UiEventsTypes.dataTransferItem

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: (
UiEventsTypes.dataTransferItemList,
FileTypes.file,
) => UiEventsTypes.dataTransferItem

Parameters

UiEventsTypes.dataTransferItemList FileTypes.file

Return type

UiEventsTypes.dataTransferItem

clear

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

let clear: UiEventsTypes.dataTransferItemList => unit

Parameters

UiEventsTypes.dataTransferItemList

Return type

unit

remove

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

let remove: (UiEventsTypes.dataTransferItemList, int) => unit

Parameters

UiEventsTypes.dataTransferItemList int

Return type

unit