Home

eventdataTransferdropEffect

Event.dataTransfer.dropEffect is a property in the HTML5 Drag and Drop API that signals the operation intended to be performed on the dragged data if a drop occurs. The dropEffect value is read and/or set during drag events, most commonly in dragover or dragenter, and is considered when determining the final drop action during the drop event. The value is a string that represents the requested operation.

Possible values for dropEffect are "none", "copy", "move", and "link". "none" indicates that no drop is allowed.

Usage typically involves handling a dragover event, calling preventDefault to indicate a drop is possible, and

Compatibility is broad across modern browsers, though subtle differences exist in how visual cues and restrictions

"copy"
suggests
that
the
data
should
be
duplicated
at
the
drop
target.
"move"
indicates
that
the
data
should
be
transferred
from
the
source
to
the
destination.
"link"
implies
that
a
link
to
the
data
should
be
created
at
the
drop
site.
The
exact
effect
that
occurs
depends
on
the
intersection
of
the
dropTarget's
requested
dropEffect
and
the
source’s
allowed
operations.
setting
event.dataTransfer.dropEffect
to
the
desired
value.
In
the
drop
event,
the
implementation
should
perform
the
corresponding
operation
(copy,
move,
or
link)
while
ensuring
the
chosen
effect
is
compatible
with
the
source’s
effectAllowed
setting.
are
enforced.
The
concept
remains
a
key
part
of
controlling
user
interaction
during
drag-and-drop
workflows.
See
also:
DataTransfer,
Drag
and
Drop
API,
effectAllowed.