1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-15 03:47:35 +00:00
serenity/Userland/Libraries/LibWeb/UIEvents/MouseEvent.idl
Itamar a802fb2023 LibWeb: Support MouseEvent.{pageX,pageY}
Unlike client{X,Y} which is relative to the current viewport, these
offsets are relative to the left edge of the document (i.e they take
scroll offset into account).
2022-12-31 16:17:48 +01:00

30 lines
785 B
Text

// https://w3c.github.io/uievents/#mouseevent
[Exposed=Window]
interface MouseEvent : UIEvent {
readonly attribute double offsetX;
readonly attribute double offsetY;
readonly attribute double clientX;
readonly attribute double clientY;
readonly attribute double screenX;
readonly attribute double screenY;
readonly attribute double x;
readonly attribute double y;
readonly attribute double pageX;
readonly attribute double pageY;
readonly attribute short button;
readonly attribute unsigned short buttons;
};
dictionary MouseEventInit : EventModifierInit {
// FIXME: offsetX and offsetY shouldn't be here.
double offsetX = 0;
double offsetY = 0;
double clientX = 0;
double clientY = 0;
short button = 0;
};