setData method
The DataTransfer.setData()
method sets the drag
operation's DataTransfer to the specified data and type. If
data for the given type does not exist, it is added at the end of the drag
data store,
such that the last item in the DataTransfer.types list will be
the new type. If data for the given type already exists, the existing data
is replaced
in the same position. That is, the order of the
DataTransfer.types list is not changed when replacing data of the
same type.
Example data types are text/plain
and text/uri-list
.
Implementation
external void setData(
String format,
String data,
);