initDragEvent
Summary
Initializes a new drag event.
Method of dom/DragEventdom/DragEvent
Syntax
event.initDragEvent(eventType, canBubble, cancelable, view, detail, screenX, screenY, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, dataTransfer);
Parameters
eventType
- Data-type
- String
The name of the event. Sets the value for the type property.
canBubble
- Data-type
- Boolean
Whether the event propagates upward. Sets the value for the bubbles property.
cancelable
- Data-type
- String
Whether the event is cancelable and so preventDefault can be called. Sets the value for the cancelable property.
view
- Data-type
- DOM Node
The window on which this event is occurring. Sets the value for the view property.
detail
- Data-type
- Number
Specifies additional information. This value is returned in the detail property of the event.
screenX
- Data-type
- Number
The x-coordinate of the mouse pointer, relative to the upper-left corner of the screen. This value is returned in the screenX property of the event.
screenY
- Data-type
- Number
The y-coordinate of the mouse pointer, relative to the upper-left corner of the screen. This value is returned in the screenY property of the event.
clientX
- Data-type
- Number
The x-coordinate of the mouse pointer, relative to the upper-left corner of the browser’s client area. This value is returned in the clientX property of the event.
clientY
- Data-type
- Number
The y-coordinate of the mouse pointer, relative to the upper-left corner of the browser’s client area. This value is returned in the clientY property of the event.
ctrlKey
- Data-type
- Boolean
The value that is returned in the ctrlKey property of the event.
altKey
- Data-type
- Boolean
The value that is returned in the altKey property of the event.
shiftKey
- Data-type
- Boolean
The value that is returned in the shiftKey property of the event.
metaKey
- Data-type
- Boolean
The value that is returned in the metaKey property of the event.
button
- Data-type
- Number
The mouse button that caused the event. This value is returned in the button property of the event.
relatedTarget
- Data-type
- DOM Node
A secondary element that is involved in the event. This value is returned in the relatedTarget property of the event.
dataTransfer
- Data-type
- String
A DataTransfer object.
Return Value
No return value
Related specifications
- HTML5
- Working Draft
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]