 Loading...
Object AMLDataTransfer
DataTransfer objects can conceptually contain various kinds of data.
Members Table
The following table lists the members exposed by the AMLDataTransfer object.
|
Show:
|
Attribute |
Readonly |
Description |
Property |
Type |
Readonly |
Description |
dropEffect |
String |
false |
Controls the drag-and-drop feedback that the user is given during a drag-and-drop operation. |
effectAllowed |
String |
false |
Used in the drag-and-drop processing model to initialise the dropEffect attribute during the dragenter and dragover events. |
types |
StringList |
true |
Contains the list of formats that are stored in the DataTransfer object. |
Method |
Returns |
Description |
addElement
|
Void |
An alternative way of specifying how the user agent is to render the drag feedback. It adds an element to the DataTransfer object. |
Sytaxis:
object.addElement(oElement) Arguments:
Name |
Type |
O/R |
Description |
oElement |
AMLElement
|
Required |
Reference to an element. |
|
clearData
|
Void |
Clears the DataTransfer object of any data associated with the given format. |
Sytaxis:
object.clearData(sFormat) Arguments:
Name |
Type |
O/R |
Description |
sFormat |
String |
Required |
Data format. |
|
getData
|
String |
Returns the data that is associated with the type format, if any. |
Sytaxis:
object.getData(sFormat) Arguments:
Name |
Type |
O/R |
Description |
sFormat |
String |
Required |
Data format. |
|
setData
|
Void |
Adds data to the data stored in the DataTransfer object, labeled as being of the type format. |
Sytaxis:
object.setData(sFormat, sData) Arguments:
Name |
Type |
O/R |
Description |
sFormat |
String |
Required |
Data format. |
sData |
String |
Required |
Data content. |
|
setDragImage
|
Void |
Sets which element to use to generate the drag feedback. |
Sytaxis:
object.setDragImage(oImage, nX, nY) Arguments:
Name |
Type |
O/R |
Description |
oImage |
AMLElement
|
Required |
Reference to an image element. |
nX |
Number |
Required |
Left coordinate. |
nY |
Number |
Required |
Top coordinate. |
|
Event |
B |
C |
Interface |
Description |
Constant |
Value |
Description |
|
Examlpes
<div ondrop="event.dataTransfer.getData('text/plain')">
<div aml:draggable="true"></div>
<div aml:draggable="true"></div>
</div>
|