LibWeb: Expose MouseEvent.{screenX,screenY}

These are currently the same as clientX and clientY, but it works for
now.
This commit is contained in:
Luke Wilde 2022-11-05 14:40:31 +00:00 committed by Andreas Kling
parent a569d02b0d
commit d6cfc735ae
Notes: sideshowbarker 2024-07-17 04:42:31 +09:00
2 changed files with 7 additions and 1 deletions

View File

@ -37,6 +37,10 @@ public:
double client_x() const { return m_client_x; }
double client_y() const { return m_client_y; }
// FIXME: Make these actually different from clientX and clientY.
double screen_x() const { return m_client_x; }
double screen_y() const { return m_client_y; }
double x() const { return client_x(); }
double y() const { return client_y(); }

View File

@ -6,6 +6,8 @@ interface MouseEvent : UIEvent {
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;
@ -23,4 +25,4 @@ dictionary MouseEventInit : EventModifierInit {
short button = 0;
};
};