W3cubDocs

/Haxe JavaScript

MouseEvent

package js.html

extends UIEventEvent

extended by DragEvent, MouseScrollEvent, PointerEvent, SimpleGestureEvent, WheelEvent

Available on js

The MouseEvent interface represents events that occur due to the user interacting with a pointing device (such as a mouse). Common events using this interface include click, dblclick, mouseup, mousedown.

Documentation MouseEvent by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

Constructor

new (typeArg:String, ?mouseEventInitDict:MouseEventInit)

Throws:

null DOMError

Variables

read only altKey:Bool

Returns true if the alt key was down when the mouse event was fired.

read only button:Int

The button number that was pressed when the mouse event was fired.

read only buttons:Int

The buttons being pressed when the mouse event was fired

read only clientX:Int

The X coordinate of the mouse pointer in local (DOM content) coordinates.

read only clientY:Int

The Y coordinate of the mouse pointer in local (DOM content) coordinates.

read only ctrlKey:Bool

Returns true if the control key was down when the mouse event was fired.

read only metaKey:Bool

Returns true if the meta key was down when the mouse event was fired.

read only movementX:Int

The X coordinate of the mouse pointer relative to the position of the last mousemove event.

read only movementY:Int

The Y coordinate of the mouse pointer relative to the position of the last mousemove event.

read only offsetX:Int

The X coordinate of the mouse pointer relative to the position of the padding edge of the target node.

read only offsetY:Int

The Y coordinate of the mouse pointer relative to the position of the padding edge of the target node.

read only region:String

Returns the id of the hit region affected by the event. If no hit region is affected, null is returned.

read only relatedTarget:EventTarget

The secondary target for the event, if there is one.

read only screenX:Int

The X coordinate of the mouse pointer in global (screen) coordinates.

read only screenY:Int

The Y coordinate of the mouse pointer in global (screen) coordinates.

read only shiftKey:Bool

Returns true if the shift key was down when the mouse event was fired.

Methods

getModifierState (keyArg:String):Bool

Returns the current state of the specified modifier key. See the KeyboardEvent.getModifierState() for details.

initMouseEvent (typeArg:String, canBubbleArg:Bool, cancelableArg:Bool, viewArg:Window, detailArg:Int, screenXArg:Int, screenYArg:Int, clientXArg:Int, clientYArg:Int, ctrlKeyArg:Bool, altKeyArg:Bool, shiftKeyArg:Bool, metaKeyArg:Bool, buttonArg:Int, relatedTargetArg:EventTarget):Void

Initializes the value of a MouseEvent created. If the event has already being dispatched, this method does nothing.

initNSMouseEvent (typeArg:String, canBubbleArg:Bool, cancelableArg:Bool, viewArg:Window, detailArg:Int, screenXArg:Int, screenYArg:Int, clientXArg:Int, clientYArg:Int, ctrlKeyArg:Bool, altKeyArg:Bool, shiftKeyArg:Bool, metaKeyArg:Bool, buttonArg:Int, relatedTargetArg:EventTarget, pressure:Float, inputSourceArg:Int):Void

© 2005–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/js/html/MouseEvent.html