Console
hyTags
Home
Home
Documentation
Documentation
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>
<div></div>
<bool-true> <assert-true>
<bool-true> <assert-true>
👆 Try to change something!
Live preview
Run
Array
Assert
Attribute
Bool
Class
Closure
Cookie
Data
Date
DateTime
Debug
Element
Error
Event
Form
Fragment
Function
If
Input
Items
Javascript
Loop
Number
Object
Page
Property
Rect
Request
Response
Selection
Storage
String
Style
Time
Url
Value
Var
Window
Quick Reference
Test succeeded
Test failed