hyTags
HomeHome DocumentationDocumentation

event-get-mouse-x

Gets the X coordinate of the mouse from a mouse event.
Parameter
Type
Description
self
Event
The mouse event object.
container
String?
The coordinate system to use: viewport, content-box, page, offset, or relative to the selected element.
return
number
The X coordinate of the mouse, or nil if not available.
Test Case:Get mouse X coordinate
    <div></div>
    
    <bool-true>
    <assert-true>
    
    👆 Try to change something!
  • Test succeeded Test failed