You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MouseEventinterface exposes pageX/Y but it doesn't allow the constructor to specify pageX/Y value.
At least on Safari, the pageX/Y value of a constructed MouseEvent (and sub-class instances) will simply be the fix to the value specified in clientX/Y, disregarding the scrolling position of the parent elements when dispatched.
My use case for pageX/Y is to be able to test the event consumption of my own script on the element. I had to result to use something like this:
The
MouseEvent
interface exposespageX/Y
but it doesn't allow the constructor to specifypageX/Y
value.At least on Safari, the
pageX/Y
value of a constructed MouseEvent (and sub-class instances) will simply be the fix to the value specified inclientX/Y
, disregarding the scrolling position of the parent elements when dispatched.My use case for
pageX/Y
is to be able to test the event consumption of my own script on the element. I had to result to use something like this:It will be merrier to be able to specify
pageX/Y
directly onMouseEventInit
.The text was updated successfully, but these errors were encountered: