dropEffect property
The DataTransfer.dropEffect property controls the
feedback (typically visual) the user is given during a drag and drop
operation. It will
affect which cursor is displayed while dragging. For example, when the
user hovers over
a target drop element, the browser's cursor may indicate which type of
operation will
occur.
When the DataTransfer object is created, dropEffect is set
to a string value. On getting, it returns its current value. On setting,
if the new
value is one of the values listed below, then the property's current value
will be set
to the new value and other values will be ignored.
For the HTMLElement.dragenter_event and HTMLElement.dragover_event
events,
dropEffect will be initialized based on what action the user is
requesting.
How this is determined is platform specific, but typically the user can
press modifier
keys such as the alt key to adjust the desired action. Within event
handlers for
HTMLElement.dragenter_event and HTMLElement.dragover_event events,
dropEffect should
be modified if a different action is desired than the action that the user
is
requesting.
For the HTMLElement.drop_event and HTMLElement.dragend_event events,
dropEffect will
be set to the action that was desired, which will be the value
dropEffect
had after the last HTMLElement.dragenter_event or
HTMLElement.dragover_event event. In a
HTMLElement.dragend_event event, for instance, if the desired dropEffect
is "move", then the
data being dragged should be removed from the source.
Implementation
external String get dropEffect;
Implementation
external set dropEffect(String value);