Commit e87db6c
events: add hasEventListener util for validate
There was some repetitive logics that validated the existence of
eventlisteners. We now replace this with a single line of,
`hasEventListener(self, type)`.
`self` is the object(e.g. EventEmitter) to be checked whether
eventlisteners exists or not.
`type` is the type of eventlisteners, which can be `undefined`
PR-URL: #55230
Reviewed-By: Jason Zhang <xzha4350@gmail.com>1 parent d69107f commit e87db6cCopy full SHA for e87db6c
File tree
Expand file treeCollapse file tree
1 file changed
+12
-12
lines changedOpen diff view settings
Filter options
- lib
Expand file treeCollapse file tree
1 file changed
+12
-12
lines changedOpen diff view settings
Collapse file
+12-12Lines changed: 12 additions & 12 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
287 | 287 | |
288 | 288 | |
289 | 289 | |
| 290 | + |
| 291 | + |
| 292 | + |
| 293 | + |
| 294 | + |
| 295 | + |
290 | 296 | |
291 | 297 | |
292 | 298 | |
| ||
680 | 686 | |
681 | 687 | |
682 | 688 | |
683 | | - |
684 | | - |
| 689 | + |
685 | 690 | |
686 | 691 | |
| 692 | + |
687 | 693 | |
688 | | - |
689 | | - |
690 | 694 | |
691 | 695 | |
692 | 696 | |
| ||
742 | 746 | |
743 | 747 | |
744 | 748 | |
745 | | - |
746 | | - |
| 749 | + |
747 | 750 | |
| 751 | + |
748 | 752 | |
749 | 753 | |
750 | 754 | |
| ||
789 | 793 | |
790 | 794 | |
791 | 795 | |
792 | | - |
793 | | - |
794 | | - |
| 796 | + |
795 | 797 | |
796 | 798 | |
797 | | - |
798 | | - |
799 | | - |
| 799 | + |
800 | 800 | |
801 | 801 | |
802 | 802 | |
|
0 commit comments