File tree 1 file changed +8
-10
lines changed
1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -1068,19 +1068,17 @@ export function emitWebIdl(
1068
1068
const hasEventListener = iNameToEhList [ i . name ] ?. length ;
1069
1069
const ehParentCount = iNameToEhParents [ i . name ] ?. length ;
1070
1070
1071
+ let target : Browser . Interface ;
1071
1072
if ( hasEventListener || ehParentCount > 1 ) {
1072
- emitTypedEventHandler ( fPrefix , addOrRemove , i , optionsType ) ;
1073
- return true ;
1073
+ target = i ;
1074
1074
} else if ( ehParentCount === 1 ) {
1075
- emitTypedEventHandler (
1076
- fPrefix ,
1077
- addOrRemove ,
1078
- iNameToEhParents [ i . name ] [ 0 ] ,
1079
- optionsType
1080
- ) ;
1081
- return true ;
1075
+ target = iNameToEhParents [ i . name ] [ 0 ] ;
1076
+ } else {
1077
+ return false ;
1082
1078
}
1083
- return false ;
1079
+
1080
+ emitTypedEventHandler ( fPrefix , addOrRemove , target , optionsType ) ;
1081
+ return true ;
1084
1082
}
1085
1083
}
1086
1084
You can’t perform that action at this time.
0 commit comments