@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="DataTransfer")
public class DataTransfer
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
dropEffect
The DataTransfer.dropEffect property controls the feedback (typically visual) the user is given during a drag and drop operation.
|
java.lang.String |
effectAllowed
The DataTransfer.effectAllowed property specifies the effect that is allowed for a drag operation.
|
| Constructor and Description |
|---|
DataTransfer()
The DataTransfer constructor creates a new DataTransfer object instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearData()
The DataTransfer.clearData() method removes the drag operation's drag data for the given type.
|
void |
clearData(java.lang.String format)
The DataTransfer.clearData() method removes the drag operation's drag data for the given type.
|
FileList |
files()
The DataTransfer.files property is a list of the files in the drag operation.
|
java.lang.String |
getData(java.lang.String format)
The DataTransfer.getData() method retrieves drag data (as a DOMString) for the specified type.
|
DataTransferItemList |
items()
The read-only DataTransfer property items property is a list of the data transfer items in a drag operation.
|
void |
setData(java.lang.String format,
java.lang.String data)
The DataTransfer.setData() method sets the drag operation's drag data to the specified data and type.
|
void |
setDragImage(Element image,
int x,
int y)
When a drag occurs, a translucent image is generated from the drag target (the element the dragstart event is fired at), and follows the mouse pointer during the drag.
|
JsArray<java.lang.String> |
types()
The DataTransfer.types read-only property returns an array of the drag data formats (as strings) that were set in the dragstart event.
|
@Nonnull public java.lang.String dropEffect
@Nonnull public java.lang.String effectAllowed
public DataTransfer()
@JsProperty(name="files") @Nonnull public FileList files()
@JsProperty(name="items") @Nonnull public DataTransferItemList items()
@JsProperty(name="types") @Nonnull public JsArray<java.lang.String> types()
public void clearData(@Nonnull
java.lang.String format)
public void clearData()
@Nonnull
public java.lang.String getData(@Nonnull
java.lang.String format)
public void setData(@Nonnull
java.lang.String format,
@Nonnull
java.lang.String data)
public void setDragImage(@Nonnull
Element image,
int x,
int y)