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

clear

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

let clear: WebAPI.UiEventsTypes.dataTransferItemList => unit

remove

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

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

Parameters

WebAPI.UiEventsTypes.dataTransferItemListint

Return type

unit