-
Notifications
You must be signed in to change notification settings - Fork 6.8k
refactor: cleanup fake event dispatch utilities #19151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: cleanup fake event dispatch utilities #19151
Conversation
Cleans up the fake event dispatch utiltities: 1. `dispatchMouseEvent` accepts an actual mouse event. This has been introduced with [this commit](04bf3d1). If a mouse event has already been created, then it can be just dispatched, but doesn't need to go through `dispatchMouseEvent` which primarily is a shorthand for creating an event and dispatching it. 2. `dispatchEvent` helper should use a generic so that we don't need to cast events unnecessarily. 3. `createMouseEvent` should not accept `x` and `y`. This is ambiguous. It's not clear what coordinates are expected. To improve this, parameters are now explicit, and a better comment has been added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Cleans up the fake event dispatch utiltities: 1. `dispatchMouseEvent` accepts an actual mouse event. This has been introduced with [this commit](04bf3d1). If a mouse event has already been created, then it can be just dispatched, but doesn't need to go through `dispatchMouseEvent` which primarily is a shorthand for creating an event and dispatching it. 2. `dispatchEvent` helper should use a generic so that we don't need to cast events unnecessarily. 3. `createMouseEvent` should not accept `x` and `y`. This is ambiguous. It's not clear what coordinates are expected. To improve this, parameters are now explicit, and a better comment has been added.
Cleans up the fake event dispatch utiltities: 1. `dispatchMouseEvent` accepts an actual mouse event. This has been introduced with [this commit](04bf3d1). If a mouse event has already been created, then it can be just dispatched, but doesn't need to go through `dispatchMouseEvent` which primarily is a shorthand for creating an event and dispatching it. 2. `dispatchEvent` helper should use a generic so that we don't need to cast events unnecessarily. 3. `createMouseEvent` should not accept `x` and `y`. This is ambiguous. It's not clear what coordinates are expected. To improve this, parameters are now explicit, and a better comment has been added.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Cleans up the fake event dispatch utiltities:
dispatchMouseEvent
accepts an actual mouse event. This has beenintroduced with this commit. If a mouse event has already been created,
then it can be just dispatched, but doesn't need to go through
dispatchMouseEvent
which primarily is a shorthand for creatingan event and dispatching it.
dispatchEvent
helper should use a generic so that we don'tneed to cast events unnecessarily.
createMouseEvent
should not acceptx
andy
. This is ambiguous.It's not clear what coordinates are expected. To improve this,
parameters are now explicit, and a better comment has been added.