forked from LadybirdBrowser/ladybird
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMouseEvent.idl
55 lines (44 loc) · 2.25 KB
/
MouseEvent.idl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#import <UIEvents/EventModifier.idl>
// https://w3c.github.io/uievents/#mouseevent
[Exposed=Window]
interface MouseEvent : UIEvent {
constructor(DOMString type, optional MouseEventInit eventInitDict = {});
// https://drafts.csswg.org/cssom-view/#extensions-to-the-mouseevent-interface
readonly attribute double screenX;
readonly attribute double screenY;
readonly attribute double pageX;
readonly attribute double pageY;
readonly attribute double clientX;
readonly attribute double clientY;
readonly attribute double x;
readonly attribute double y;
readonly attribute double offsetX;
readonly attribute double offsetY;
readonly attribute boolean ctrlKey;
readonly attribute boolean shiftKey;
readonly attribute boolean altKey;
readonly attribute boolean metaKey;
// https://w3c.github.io/pointerlock/#extensions-to-the-mouseevent-interface
readonly attribute double movementX;
readonly attribute double movementY;
readonly attribute short button;
readonly attribute unsigned short buttons;
readonly attribute EventTarget? relatedTarget;
boolean getModifierState(DOMString keyArg);
// https://w3c.github.io/uievents/#dom-mouseevent-initmouseevent
undefined initMouseEvent(DOMString typeArg, optional boolean bubblesArg = false, optional boolean cancelableArg = false, optional WindowProxy? viewArg = null, optional long detailArg = 0, optional long screenXArg = 0, optional long screenYArg = 0, optional long clientXArg = 0, optional long clientYArg = 0, optional boolean ctrlKeyArg = false, optional boolean altKeyArg = false, optional boolean shiftKeyArg = false, optional boolean metaKeyArg = false, optional short buttonArg = 0, optional EventTarget? relatedTargetArg = null);
};
// https://w3c.github.io/uievents/#idl-mouseeventinit
dictionary MouseEventInit : EventModifierInit {
// https://drafts.csswg.org/cssom-view/#extensions-to-the-mouseevent-interface
double screenX = 0;
double screenY = 0;
double clientX = 0;
double clientY = 0;
// https://w3c.github.io/pointerlock/#extensions-to-the-mouseeventinit-dictionary
double movementX = 0;
double movementY = 0;
short button = 0;
unsigned short buttons = 0;
EventTarget? relatedTarget = null;
};