C

DragEventArgs

The event argument that will be used by DropTarget to notify handlers of the various events during a drag and drop operation.
Inheritance Hierarchy

Remarks

This class cannot be instantiated

Members

No filters for this type

Properties

Gets or sets the effects that the current handler can realize.
Setting this value will automatically mark this instance as handled.
conversionfinal

Property Value

The effects.
Gets the allowed effects for the current drag operation as specified by the DragSource.
readonlyfinal

Property Value

The allowed effects.
Gets or sets a value indicating whether this DragEventArgs has been handled.

This property needs to be adjusted by handlers to tell the engine that the event has been handled.

Note that this property needs to be set before the function synchronously returns. This means that setting the value in an async function after the first await or in an asynchronous callback, it cannot not be seen by the emitter of the event and the sender will consider the event as not being handled.

// wrong:
mode.addEventListener('drag-enter', async (evt) => {
  await something()
  evt.handled = true // will be set *after* all other event listeners have been invoked, only
})

// correct:
mode.addEventListener('drag-enter', async (evt) => {
  evt.handled = true // will be set immediately and 'mode' will see the change
  await something()
})
final

Property Value

true if handled; otherwise, false.
Gets the data that is associated with the drag.
readonlyfinal

Property Value

The data.

See Also

API
startDrag
Gets the key states relevant during the drag and drop operation.
readonlyfinal

Property Value

The current key states.

Methods

Gets the position of the current drag operation in the coordinates system of the provided element.
final

Parameters

element: HTMLElement
The element for which the coordinates should be used.

Return Value

Point
The position in the coordinates system of element