MouseEvent
Module: JavaScript DOM API
#include <MouseEvent.idl>
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| MouseEvent | MouseEvent(DOMInternedString type, optional MouseEventInit eventInitDict) |
| void | initMouseEvent(optional DOMInternedString typeArg, optional boolean canBubbleArg, optional boolean cancelableArg, optional Window? viewArg, optional long detailArg, optional long screenXArg, optional long screenYArg, optional long clientXArg, optional long clientYArg, optional boolean ctrlKeyArg, optional boolean altKeyArg, optional boolean shiftKeyArg, optional boolean metaKeyArg, optional short buttonArg, optional Node? relatedTargetArg) |
| boolean | getModifierState(DOMString keyIdentifier) Queries the state of a modifier using a key value. |
Public Attributes
Section titled “Public Attributes”| Name | |
|---|---|
| readonly attribute long | screenX |
| readonly attribute long | screenY |
| readonly attribute long | movementX |
| readonly attribute long | movementY |
| readonly attribute long | clientX |
| readonly attribute long | clientY |
| readonly attribute long | x |
| readonly attribute long | y |
| readonly attribute boolean | ctrlKey |
| readonly attribute boolean | shiftKey |
| readonly attribute boolean | altKey |
| readonly attribute boolean | metaKey |
| readonly attribute short | button |
| readonly attribute unsigned short | buttons |
| readonly attribute float | deltaX |
| readonly attribute float | deltaY |
| readonly attribute unsigned short | deltaMode |
| readonly attribute EventTarget | relatedTarget |
Additional inherited members
Section titled “Additional inherited members”Public Functions inherited from UIEvent
| Name | |
|---|---|
| UIEvent | UIEvent(DOMInternedString type, optional UIEventInit initEvent) |
| void | initUIEvent(optional DOMInternedString type, optional boolean canBubble, optional boolean cancelable, optional Window? view, optional long detail) |
Public Attributes inherited from UIEvent
| Name | |
|---|---|
| readonly attribute long | detail |
Public Functions inherited from Event
| Name | |
|---|---|
| Event | Event(DOMInternedString type, optional EventInit initEvent) |
| void | stopPropagation() |
| void | preventDefault() |
| void | initEvent(optional DOMInternedString eventTypeArg, optional boolean canBubbleArg, optional boolean cancelableArg) |
| void | stopImmediatePropagation() |
Public Attributes inherited from Event
| Name | |
|---|---|
| const unsigned short | NONE |
| const unsigned short | CAPTURING_PHASE |
| const unsigned short | AT_TARGET |
| const unsigned short | BUBBLING_PHASE |
| readonly attribute DOMString | type |
| readonly attribute EventTarget | target |
| readonly attribute EventTarget | currentTarget |
| readonly attribute unsigned short | eventPhase |
| readonly attribute boolean | bubbles |
| readonly attribute boolean | cancelable |
| readonly attribute boolean | defaultPrevented |
| readonly attribute boolean | composed |
Public Functions Documentation
Section titled “Public Functions Documentation”function MouseEvent
Section titled “function MouseEvent”MouseEvent MouseEvent( DOMInternedString type, optional MouseEventInit eventInitDict)function initMouseEvent
Section titled “function initMouseEvent”void initMouseEvent( optional DOMInternedString typeArg, optional boolean canBubbleArg, optional boolean cancelableArg, optional Window? viewArg, optional long detailArg, optional long screenXArg, optional long screenYArg, optional long clientXArg, optional long clientYArg, optional boolean ctrlKeyArg, optional boolean altKeyArg, optional boolean shiftKeyArg, optional boolean metaKeyArg, optional short buttonArg, optional Node? relatedTargetArg)function getModifierState
Section titled “function getModifierState”boolean getModifierState( DOMString keyIdentifier)Queries the state of a modifier using a key value.
Parameters:
- keyIdentifier A modifier key value.
Return: true if it is a modifier key and the modifier is activated, false otherwise.
Public Attributes Documentation
Section titled “Public Attributes Documentation”variable screenX
Section titled “variable screenX”readonly attribute long screenX;variable screenY
Section titled “variable screenY”readonly attribute long screenY;variable movementX
Section titled “variable movementX”readonly attribute long movementX;variable movementY
Section titled “variable movementY”readonly attribute long movementY;variable clientX
Section titled “variable clientX”readonly attribute long clientX;variable clientY
Section titled “variable clientY”readonly attribute long clientY;variable x
Section titled “variable x”readonly attribute long x;variable y
Section titled “variable y”readonly attribute long y;variable ctrlKey
Section titled “variable ctrlKey”readonly attribute boolean ctrlKey;variable shiftKey
Section titled “variable shiftKey”readonly attribute boolean shiftKey;variable altKey
Section titled “variable altKey”readonly attribute boolean altKey;variable metaKey
Section titled “variable metaKey”readonly attribute boolean metaKey;variable button
Section titled “variable button”readonly attribute short button;variable buttons
Section titled “variable buttons”readonly attribute unsigned short buttons;variable deltaX
Section titled “variable deltaX”readonly attribute float deltaX;variable deltaY
Section titled “variable deltaY”readonly attribute float deltaY;variable deltaMode
Section titled “variable deltaMode”readonly attribute unsigned short deltaMode;variable relatedTarget
Section titled “variable relatedTarget”readonly attribute EventTarget relatedTarget;© 2026 Coherent Labs. All rights reserved.