Skip to content

Commit

Permalink
Add offsetX, offsetY to MouseEvent
Browse files Browse the repository at this point in the history
Summary: Changelog: [Internal] - Adding offsetX, offsetY to MouseEvent interface. It's currently provided in a draft form: https://drafts.csswg.org/cssom-view/#extensions-to-the-mouseevent-interface

Reviewed By: vincentriemer

Differential Revision: D37436051

fbshipit-source-id: b3bb85acb82db348d3e1085881232e5358674ed7
  • Loading branch information
Luna Wei authored and facebook-github-bot committed Jul 5, 2022
1 parent 54f0381 commit d9b8e07
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Libraries/Types/CoreEventTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,15 @@ export interface NativeMouseEvent extends NativeUIEvent {
* The secondary target for the event, if there is one.
*/
+relatedTarget: null | number | React.ElementRef<HostComponent<mixed>>;
// offset is proposed: https://drafts.csswg.org/cssom-view/#extensions-to-the-mouseevent-interface
/**
* The X coordinate of the mouse pointer between that event and the padding edge of the target node
*/
+offsetX: number;
/**
* The Y coordinate of the mouse pointer between that event and the padding edge of the target node
*/
+offsetY: number;
}

/**
Expand Down

0 comments on commit d9b8e07

Please sign in to comment.