MouseEvent
Module: JavaScript DOM API
#include <MouseEvent.idl>
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
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
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 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
function MouseEvent
MouseEvent MouseEvent(
DOMInternedString type,
optional MouseEventInit eventInitDict
)
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
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
variable screenX
readonly attribute long screenX;
variable screenY
readonly attribute long screenY;
variable movementX
readonly attribute long movementX;
variable movementY
readonly attribute long movementY;
variable clientX
readonly attribute long clientX;
variable clientY
readonly attribute long clientY;
variable x
readonly attribute long x;
variable y
readonly attribute long y;
variable ctrlKey
readonly attribute boolean ctrlKey;
variable shiftKey
readonly attribute boolean shiftKey;
variable altKey
readonly attribute boolean altKey;
variable metaKey
readonly attribute boolean metaKey;
variable button
readonly attribute short button;
variable buttons
readonly attribute unsigned short buttons;
variable deltaX
readonly attribute float deltaX;
variable deltaY
readonly attribute float deltaY;
variable deltaMode
readonly attribute unsigned short deltaMode;
variable relatedTarget
readonly attribute EventTarget relatedTarget;