forked from angular/components
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: cleanup fake event dispatch utilities (angular#19151)
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.
- Loading branch information
1 parent
70036cb
commit ed4e91d
Showing
4 changed files
with
29 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters