2022-10-07 16:45:09 -06:00
|
|
|
// https://w3c.github.io/uievents/#mouseevent
|
2023-09-03 02:00:01 +12:00
|
|
|
[Exposed=Window]
|
2021-10-01 19:31:25 +03:00
|
|
|
interface MouseEvent : UIEvent {
|
2023-09-08 17:50:53 +02:00
|
|
|
// FIXME: constructor(DOMString type, optional MouseEventInit eventInitDict = {});
|
2020-06-21 16:10:48 +02:00
|
|
|
|
2023-09-08 17:50:53 +02:00
|
|
|
// https://drafts.csswg.org/cssom-view/#extensions-to-the-mouseevent-interface
|
2022-11-05 14:40:31 +00:00
|
|
|
readonly attribute double screenX;
|
|
|
|
|
readonly attribute double screenY;
|
2022-12-31 16:40:36 +02:00
|
|
|
readonly attribute double pageX;
|
|
|
|
|
readonly attribute double pageY;
|
2023-09-08 17:50:53 +02:00
|
|
|
readonly attribute double clientX;
|
|
|
|
|
readonly attribute double clientY;
|
|
|
|
|
readonly attribute double x;
|
|
|
|
|
readonly attribute double y;
|
|
|
|
|
readonly attribute double offsetX;
|
|
|
|
|
readonly attribute double offsetY;
|
|
|
|
|
|
|
|
|
|
// FIXME: readonly attribute boolean ctrlKey;
|
|
|
|
|
// FIXME: readonly attribute boolean shiftKey;
|
|
|
|
|
// FIXME: readonly attribute boolean altKey;
|
|
|
|
|
// FIXME: readonly attribute boolean metaKey;
|
2020-06-21 16:10:48 +02:00
|
|
|
|
2023-08-24 17:47:13 +02:00
|
|
|
// https://w3c.github.io/pointerlock/#extensions-to-the-mouseevent-interface
|
|
|
|
|
readonly attribute double movementX;
|
|
|
|
|
readonly attribute double movementY;
|
|
|
|
|
|
2022-04-09 12:44:42 -03:00
|
|
|
readonly attribute short button;
|
2022-10-20 20:56:38 +03:00
|
|
|
readonly attribute unsigned short buttons;
|
2023-09-08 17:50:53 +02:00
|
|
|
|
|
|
|
|
// FIXME: readonly attribute EventTarget? relatedTarget;
|
|
|
|
|
|
|
|
|
|
// FIXME: boolean getModifierState(DOMString keyArg);
|
2020-12-09 21:26:42 +00:00
|
|
|
};
|
2022-04-09 12:44:42 -03:00
|
|
|
|
2023-09-08 17:50:53 +02:00
|
|
|
// https://w3c.github.io/uievents/#idl-mouseeventinit
|
2022-04-09 12:44:42 -03:00
|
|
|
dictionary MouseEventInit : EventModifierInit {
|
2023-09-08 17:50:53 +02:00
|
|
|
// https://drafts.csswg.org/cssom-view/#extensions-to-the-mouseevent-interface
|
|
|
|
|
double screenX = 0;
|
|
|
|
|
double screenY = 0;
|
2022-04-09 12:44:42 -03:00
|
|
|
double clientX = 0;
|
|
|
|
|
double clientY = 0;
|
|
|
|
|
|
2023-08-24 17:47:13 +02:00
|
|
|
// https://w3c.github.io/pointerlock/#extensions-to-the-mouseeventinit-dictionary
|
|
|
|
|
double movementX = 0;
|
|
|
|
|
double movementY = 0;
|
|
|
|
|
|
2022-04-09 12:44:42 -03:00
|
|
|
short button = 0;
|
2023-09-08 17:50:53 +02:00
|
|
|
unsigned short buttons = 0;
|
|
|
|
|
// FIXME: EventTarget? relatedTarget = null;
|
2022-11-05 14:40:31 +00:00
|
|
|
};
|