Class DragEvent
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The DragEvent interface is a DOM event that represents a drag and drop interaction. The user initiates a drag by placing a pointer device (such as a mouse) on the touch surface and then dragging the pointer to a new location (such as another DOM element). Applications are free to interpret a drag and drop interaction in an application-specific way.
[Value("DragEvent")]
public class DragEvent : MouseEvent
- Inheritance
-
DragEvent
- Inherited Members
Remarks
This interface inherits properties from MouseEvent and Event.
Constructors
DragEvent()
public DragEvent()
DragEvent(string, DragEventInit)
This constructor is used to create a synthetic DragEvent object.
public DragEvent(string type, DragEventInit eventInitDict = null)
Parameters
typestringeventInitDictDragEventInit
Remarks
Although this interface has a constructor, it is not possible to create a
useful DataTransfer object from script, since DataTransfer
objects have a processing and security model that is coordinated by the browser during
drag-and-drops.
This interface inherits properties from MouseEvent and
Event.
Properties
DataTransfer
The DragEvent.dataTransfer read-only property holds the drag
operation's data (as a DataTransfer object).
[Value("dataTransfer")]
public DataTransfer? DataTransfer { get; }
Property Value
- DataTransfer
A DataTransfer object which contains the {{domxref("DragEvent","drag event's data", "", 1)}}.The property can be
nullwhen the event is created using the constructor. It is nevernullwhen dispatched by the browser.