Skip to content

DataTransfer

Values

clearData

Removes the data of the specified formats. Removes all data if the argument is omitted. Read more on MDN

let clearData: (WebAPI.UIEventsAPI.dataTransfer, ~format: string=?) => unit

Parameters

WebAPI.UIEventsAPI.dataTransfer option< string >

Return type

unit

getData

Returns the specified data. If there is no such data, returns the empty string. Read more on MDN

let getData: (WebAPI.UIEventsAPI.dataTransfer, string) => string

Parameters

WebAPI.UIEventsAPI.dataTransfer string

Return type

string

make

let make: unit => WebAPI.UIEventsAPI.dataTransfer

Parameters

unit

Return type

WebAPI.UIEventsAPI.dataTransfer

setData

Adds the specified data. Read more on MDN

let setData: (
WebAPI.UIEventsAPI.dataTransfer,
~format: string,
~data: string,
) => unit

Parameters

WebAPI.UIEventsAPI.dataTransfer string string

Return type

unit

setDragImage

Uses the given element to update the drag feedback, replacing any previously specified feedback. Read more on MDN

let setDragImage: (
WebAPI.UIEventsAPI.dataTransfer,
~image: WebAPI.DOMAPI.element,
~x: int,
~y: int,
) => unit

Parameters

WebAPI.UIEventsAPI.dataTransfer WebAPI.DOMAPI.element int int

Return type

unit