This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

DragEvent

Inherits from MouseEventMouseEvent

Properties

dataTransfer
:

Methods

initDragEvent
Initializes a new drag event.

Events

drag
:

dragend
:

dragenter
:

dragleave
:

dragover
:

dragstart
:

drop
:

Inherited from MouseEvent

Properties

button
Gets the mouse button that caused an event.
buttons
Gets a value that indicates which mouse buttons a user pressed.
clientX
Gets the x-coordinate of the mouse pointer, relative to the upper-left corner of the viewport (that is, the user agent’s client area).
clientY
Gets the y-coordinate of the mouse pointer, relative to the upper-left corner of the viewport (that is, the user agent’s client area).
layerX
Gets the x-coordinate of the mouse pointer, relative to the last positioned ancestor element.
layerY
Returns the horizontal coordinate of the event relative to the current layer. layerY is a non-standards property of the MouseEvent object.
relatedTarget
Gets the secondary element that is involved in an event. The relatedTarget property is used to find the other element, if any, involved in an event. Events like mouseover are oriented around a certain target, but also involve a secondary target, such as the target that is exited as the mouseover event fires for the primary target.
screenX
Gets the x-coordinate of the mouse pointer, relative to the upper-left corner of the screen.
screenY
Gets the y-coordinate of the mouse pointer, relative to the upper-left corner of the screen.
x
Gets the x-coordinate of the mouse cursor, relative to the last positioned ancestor element.
y
Gets the y-coordinate of the mouse pointer, relative to the last positioned ancestor element.

Methods

initMouseEvent
Initializes a new mouse event that the createEvent method created.

Events

click
The click event is triggered for an element when it is activated by a mouse click or by another user action that normally has the same effect as a mouse click.
dblclick
A mouse double click event.
mousedown
Fires when the user clicks the object with either mouse button or taps the mouse pad.
mouseenter
Fires when the user moves the mouse pointer into the object.
mouseleave
Fires when the user moves the mouse pointer outside the boundaries of the object.
mousemove
Fires when the user moves the mouse over the object.
mouseout
Fires when the user moves the mouse pointer outside the boundaries of the object.
mouseover
Fires when the user moves the mouse pointer into the object.
mouseup
Fires when the user releases a mouse button while the mouse is over the object.

Standards information

Attributions