Public Member Functions | Public Attributes

nsIDOMNSDataTransfer Interface Reference

import "nsIDOMDataTransfer.idl";

List of all members.

Public Member Functions

nsIDOMDataTransfer clone (in PRUint32 aEventType, in PRBool aUserCancelled)
 Creates a copy of the data transfer object, for the given event type and user cancelled flag.
nsIDOMDOMStringList mozTypesAt (in unsigned long index)
 Holds a list of the format types of the data that is stored for an item at the specified index.
void mozClearDataAt (in DOMString format, in unsigned long index)
 Remove the data associated with the given format for an item at the specified index.
void mozSetDataAt (in DOMString format, in nsIVariant data, in unsigned long index)
nsIVariant mozGetDataAt (in DOMString format, in unsigned long index)
 Retrieve the data associated with the given format for an item at the specified index, or null if it does not exist.

Public Attributes

attribute unsigned long dropEffectInt
attribute unsigned long effectAllowedInt
readonly attribute unsigned long mozItemCount
 The number of items being dragged.
attribute DOMString mozCursor
 Sets the drag cursor state.
readonly attribute boolean mozUserCancelled
 Will be true when the user has cancelled the drag (typically by pressing Escape) and when the drag has been cancelled unexpectedly.

Member Function Documentation

nsIDOMDataTransfer nsIDOMNSDataTransfer::clone ( in PRUint32  aEventType,
in PRBool  aUserCancelled 
)

Creates a copy of the data transfer object, for the given event type and user cancelled flag.

void nsIDOMNSDataTransfer::mozClearDataAt ( in DOMString  format,
in unsigned long  index 
)

Remove the data associated with the given format for an item at the specified index.

The index is in the range from zero to itemCount - 1.

If the last format for the item is removed, the entire item is removed, reducing the itemCount by one.

If format is empty, then the data associated with all formats is removed. If the format is not found, then this method has no effect.

Parameters:
format the format to remove
Exceptions:
NS_ERROR_DOM_INDEX_SIZE_ERR if index is greater or equal than itemCount
NO_MODIFICATION_ALLOWED_ERR if the item cannot be modified
nsIVariant nsIDOMNSDataTransfer::mozGetDataAt ( in DOMString  format,
in unsigned long  index 
)

Retrieve the data associated with the given format for an item at the specified index, or null if it does not exist.

The index should be in the range from zero to itemCount - 1.

Parameters:
format the format of the data to look up
Returns:
the data of the given format, or null if it doesn't exist.
Exceptions:
NS_ERROR_DOM_INDEX_SIZE_ERR if index is greater or equal than itemCount
void nsIDOMNSDataTransfer::mozSetDataAt ( in DOMString  format,
in nsIVariant  data,
in unsigned long  index 
)
nsIDOMDOMStringList nsIDOMNSDataTransfer::mozTypesAt ( in unsigned long  index  ) 

Holds a list of the format types of the data that is stored for an item at the specified index.

If the index is not in the range from 0 to itemCount - 1, an empty string list is returned.


Member Data Documentation

attribute unsigned long nsIDOMNSDataTransfer::dropEffectInt
attribute unsigned long nsIDOMNSDataTransfer::effectAllowedInt
attribute DOMString nsIDOMNSDataTransfer::mozCursor

Sets the drag cursor state.

Primarily used to control the cursor during tab drags, but could be expanded to other uses. XXX Currently implemented on Win32 only.

Possible values: auto - use default system behavior. default - set the cursor to an arrow during the drag operation.

Values other than 'default' are indentical to setting mozCursor to 'auto'.

readonly attribute unsigned long nsIDOMNSDataTransfer::mozItemCount

The number of items being dragged.

Will be true when the user has cancelled the drag (typically by pressing Escape) and when the drag has been cancelled unexpectedly.

This will be false otherwise, including when the drop has been rejected by its target. This property is only relevant for the dragend event.


The documentation for this interface was generated from the following file: