DataTransfer class
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.
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- DataTransfer()
-
factory
Properties
- clearData ↔ void Function([String?])
-
Available on DataTransfer, provided by the DataTransfer$Typings extension
getter/setter pair - dropEffect ↔ DropEffect
-
Available on DataTransfer, provided by the DataTransfer$Typings extension
Returns the kind of operation that is currently selected. If the kind of operation isn't one of those that is allowed by the effectAllowed attribute, then the operation will fail.getter/setter pair - effectAllowed ↔ EffectAllowed
-
Available on DataTransfer, provided by the DataTransfer$Typings extension
Returns the kinds of operations that are to be allowed.getter/setter pair - files → FileList
-
Available on DataTransfer, provided by the DataTransfer$Typings extension
Returns a FileList of the files being dragged, if any.no setter - getData ↔ String Function(String)
-
Available on DataTransfer, provided by the DataTransfer$Typings extension
getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- items → DataTransferItemList
-
Available on DataTransfer, provided by the DataTransfer$Typings extension
Returns a DataTransferItemList object, with the drag data.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- setData ↔ void Function(String, String)
-
Available on DataTransfer, provided by the DataTransfer$Typings extension
getter/setter pair - setDragImage ↔ void Function(Element, num, num)
-
Available on DataTransfer, provided by the DataTransfer$Typings extension
getter/setter pair -
types
→ ReadonlyArray<
String> -
Available on DataTransfer, provided by the DataTransfer$Typings extension
Returns a frozen array listing the formats that were set in the dragstart event. In addition, if any files are being dragged, then one of the types will be the string "Files".no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited