Module

Web.HTML.Event.DataTransfer

#DataTransfer

#files

files :: DataTransfer -> Maybe FileList

Contains a list of all the local files available on the data transfer. Empty if the drag operation doesn't involve dragging files.

It's possible that a drag operation may have null files, instead of an empty file list. In these cases Nothing is returned.

#items

items :: DataTransfer -> DataTransferItemList

Returns a DataTransferItemList object which is a list of all of the drag data.

#types

types :: DataTransfer -> Array String

Returns an array of data formats used in the drag operation. If the drag operation included no data, then the array is empty.

#getData

getData :: MediaType -> DataTransfer -> Effect String

Retrieves the data for a given media type, or an empty string if data for that type does not exist or the data transfer object contains no data.

#setData

setData :: MediaType -> String -> DataTransfer -> Effect Unit

Sets the data transfer object's data for a given media format.

#setDragImage

setDragImage :: DataTransfer -> Element -> Int -> Int -> Effect Unit

Sets the image to be used for dragging if a custom one is desired. The image will typically be an <image> but could be any other visible element. The x and y coordinates define where the image appears relative to the mouse.

#DropEffect

#dropEffect

dropEffect :: DataTransfer -> Effect DropEffect

Gets the data transfer object's drop effect.

#setDropEffect

setDropEffect :: DropEffect -> DataTransfer -> Effect Unit

Sets the data transfer object's drop effect.

Modules