W3cubDocs

/Haxe JavaScript

DataTransfer

package js.html

@:native("DataTransfer") Available on js

The DataTransfer object is used to hold the data that is being dragged during a drag and drop operation. It may hold one or more data items, each of one or more data types. For more information about drag and drop, see HTML Drag and Drop API.

Documentation DataTransfer by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

Constructor

new (eventType:String, isExternal:Bool)

Throws:

null DOMError

Variables

dropEffect:String

Gets the type of drag-and-drop operation currently selected or sets the operation to a new type. The value must be none, copy, link or move.

effectAllowed:String

Provides all of the types of operations that are possible. Must be one of none, copy, copyLink, copyMove, link, linkMove, move, all or uninitialized.

read only files:FileList

Contains a list of all the local files available on the data transfer. If the drag operation doesn't involve dragging files, this property is an empty list.

read only types:DOMStringList

An array of DOMString giving the formats that were set in the dragstart event.

Methods

addElement (element:Element):Void

Throws:

null DOMError

clearData (?format:String):Void

Throws:

null DOMError

getData (format:String):String

Throws:

null DOMError

setData (format:String, data:String):Void

Throws:

null DOMError

setDragImage (image:Element, x:Int, y:Int):Void

Throws:

null DOMError

© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/DataTransfer.html