mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
LibWeb: Expose the MouseEvent::{clientX, clientY} attributes
These provide the cursor coordinate within the viewport at which the event occurred (as opposed to the page relative coordinates exposed via offsetX, offsetY).
This commit is contained in:
parent
815934a95d
commit
ad8e2f481d
5 changed files with 16 additions and 8 deletions
|
@ -30,10 +30,12 @@
|
|||
|
||||
namespace Web::UIEvents {
|
||||
|
||||
MouseEvent::MouseEvent(const FlyString& event_name, i32 offset_x, i32 offset_y)
|
||||
MouseEvent::MouseEvent(const FlyString& event_name, i32 offset_x, i32 offset_y, i32 client_x, i32 client_y)
|
||||
: UIEvent(event_name)
|
||||
, m_offset_x(offset_x)
|
||||
, m_offset_y(offset_y)
|
||||
, m_client_x(client_x)
|
||||
, m_client_y(client_y)
|
||||
{
|
||||
set_event_characteristics();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue