mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 07:47:34 +00:00
LibWeb: Partially implement MouseEvent.movementX/movementY
Currently doesn't handle the mouse leaving and entering the window per the spec, and uses clientX/Y instead of screenX/Y. See FIXMEs.
This commit is contained in:
parent
ebb7079795
commit
e0e67a2b27
5 changed files with 51 additions and 8 deletions
|
@ -13,6 +13,10 @@ interface MouseEvent : UIEvent {
|
|||
readonly attribute double pageX;
|
||||
readonly attribute double pageY;
|
||||
|
||||
// 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;
|
||||
};
|
||||
|
@ -25,6 +29,10 @@ dictionary MouseEventInit : EventModifierInit {
|
|||
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;
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue