Commit bdb6d12
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 787e51e commit bdb6d12Copy full SHA for bdb6d12
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 |
|---|---|---|
| ||
276 | 276 | |
277 | 277 | |
278 | 278 | |
| 279 | + |
| 280 | + |
| 281 | + |
| 282 | + |
| 283 | + |
| 284 | + |
279 | 285 | |
280 | 286 | |
281 | 287 | |
| ||
669 | 675 | |
670 | 676 | |
671 | 677 | |
672 | | - |
673 | | - |
| 678 | + |
674 | 679 | |
675 | 680 | |
| 681 | + |
676 | 682 | |
677 | | - |
678 | | - |
679 | 683 | |
680 | 684 | |
681 | 685 | |
| ||
729 | 733 | |
730 | 734 | |
731 | 735 | |
732 | | - |
733 | | - |
| 736 | + |
734 | 737 | |
| 738 | + |
735 | 739 | |
736 | 740 | |
737 | 741 | |
| ||
776 | 780 | |
777 | 781 | |
778 | 782 | |
779 | | - |
780 | | - |
781 | | - |
| 783 | + |
782 | 784 | |
783 | 785 | |
784 | | - |
785 | | - |
786 | | - |
| 786 | + |
787 | 787 | |
788 | 788 | |
789 | 789 | |
|
0 commit comments