Le 17/08/2010 02:04, Jason Gross a écrit :
Is it possible to get more specificity than just the type of the
object being dragged? For example, if I have red images and blue
images, and a red target and a blue target, and I want to be able to
drop red images only on the red target, and blue
I don't think anything in the spec should prevent that. dragenter handlers
attached to different drop targets can check event.dataTransfer.types and
decide if they want to accept the drag or not.
That being said, do any operating systems actually support multiple
concurrent drags and drops?
Is it possible to get more specificity than just the type of the object
being dragged? For example, if I have red images and blue images, and a red
target and a blue target, and I want to be able to drop red images only on
the red target, and blue images only on the blue target, is there a good
You can set types of your choice in dragstart, since your drag source should
know which is which. By design, drop targets can't inspect anything but the
types until the object is actually dropped.
Daniel
On Mon, Aug 16, 2010 at 17:04, Jason Gross
Greetings,
The specification says that the dragenter event is used to determine
whether or not the drop target is to accept the drop. Do functions bound
to this event get any information about the object being dragged? In
particular, is there a good way to have N drop targets, and have each of