package js.html
extended by DragEvent, MouseScrollEvent, PointerEvent, 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 also:
new(typeArg:String, ?mouseEventInitDict:Null<MouseEventInit>)Throws:
null |
DOMError |
|---|
read onlyaltKey:BoolReturns true if the alt key was down when the mouse event was fired.
read onlybutton:IntThe button number that was pressed (if applicable) when the mouse event was fired.
read onlybuttons:IntThe buttons being depressed (if any) when the mouse event was fired.
read onlyclientX:IntThe X coordinate of the mouse pointer in local (DOM content) coordinates.
read onlyclientY:IntThe Y coordinate of the mouse pointer in local (DOM content) coordinates.
read onlyctrlKey:BoolReturns true if the control key was down when the mouse event was fired.
read onlymetaKey:BoolReturns true if the meta key was down when the mouse event was fired.
read onlymovementX:IntThe X coordinate of the mouse pointer relative to the position of the last mousemove event.
read onlymovementY:IntThe Y coordinate of the mouse pointer relative to the position of the last mousemove event.
read onlyoffsetX:IntThe X coordinate of the mouse pointer relative to the position of the padding edge of the target node.
read onlyoffsetY:IntThe Y coordinate of the mouse pointer relative to the position of the padding edge of the target node.
read onlyregion:StringReturns the id of the hit region affected by the event. If no hit region is affected, null is returned.
read onlyrelatedTarget:EventTargetThe secondary target for the event, if there is one.
read onlyscreenX:IntThe X coordinate of the mouse pointer in global (screen) coordinates.
read onlyscreenY:IntThe Y coordinate of the mouse pointer in global (screen) coordinates.
read onlyshiftKey:BoolReturns true if the shift key was down when the mouse event was fired.
read onlyx:IntAlias for MouseEvent.clientX.
read onlyy:IntMouseEvent.clientY
getModifierState(keyArg:String):BoolReturns the current state of the specified modifier key. See the KeyboardEvent.getModifierState() for details.
initMouseEvent(typeArg:String, canBubbleArg:Bool = false, cancelableArg:Bool = false, ?viewArg:Window, detailArg:Int = 0, screenXArg:Int = 0, screenYArg:Int = 0, clientXArg:Int = 0, clientYArg:Int = 0, ctrlKeyArg:Bool = false, altKeyArg:Bool = false, shiftKeyArg:Bool = false, metaKeyArg:Bool = false, buttonArg:Int = 0, ?relatedTargetArg:EventTarget):VoidInitializes the value of a MouseEvent created. If the event has already being dispatched, this method does nothing.
initNSMouseEvent(typeArg:String, canBubbleArg:Bool = false, cancelableArg:Bool = false, ?viewArg:Window, detailArg:Int = 0, screenXArg:Int = 0, screenYArg:Int = 0, clientXArg:Int = 0, clientYArg:Int = 0, ctrlKeyArg:Bool = false, altKeyArg:Bool = false, shiftKeyArg:Bool = false, metaKeyArg:Bool = false, buttonArg:Int = 0, ?relatedTargetArg:EventTarget, pressure:Float = 0.0, inputSourceArg:Int = 0):Void
© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/MouseEvent.html