DragEvent

< dom
Jump to: navigation, search

DragEvent

This article is In Progress.


W3C Candidate Recommendation

Needs Summary: This article does not have a summary. Summaries give a brief overview of the topic and are automatically included on some listing pages that link to this article.

Inherits from MouseEvent

Properties

API Name Summary
dataTransfer


Methods

API Name Summary
initDragEvent Initializes a new drag event.


Events

API Name Summary
drag
dragend
dragenter
dragleave
dragover
dragstart
drop


Inherited from MouseEvent

Properties

API Name Summary
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

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

Events

API Name Summary
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.

Needs Examples: This section should include examples.


Standards information

Compatibility

Desktop

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? ? ? ? ?

Mobile

Feature Android BlackBerry Chrome for mobile Firefox Mobile (Gecko) IE Mobile Opera Mobile Opera Mini Safari Mobile
Basic support ? ? ? ? ? ? ? ?

Attribution

This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]