File tree 3 files changed +3
-9
lines changed 3 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -329,15 +329,11 @@ let EmitMethods flavor prefix (emitScope: EmitScope) (i: Browser.Interface) =
329
329
let emitMethodFromJson ( m : ItemsType.Root ) =
330
330
m.Signatures |> Array.iter ( Pt.printl " %s%s ;" prefix)
331
331
332
- // Because eventhandler overload are not inherited between interfaces,
333
- // they need to be taken care of seperately
334
- let hasEventHandlers =
335
- iNameToEhList.ContainsKey i.Name &&
336
- not iNameToEhList.[ i.Name]. IsEmpty
337
-
332
+ // If prefix is not empty, then this is the global declare function addEventListener, we want to override this
333
+ // Otherwise, this is EventTarget.addEventListener, we want to keep that.
338
334
let mFilter ( m : Browser.Method ) =
339
335
matchScope emitScope m &&
340
- not ( hasEventHandlers && OptionCheckValue " addEventListener" m.Name)
336
+ not ( prefix <> " " && OptionCheckValue " addEventListener" m.Name)
341
337
342
338
if i.Methods.IsSome then
343
339
i.Methods.Value.Methods
Original file line number Diff line number Diff line change @@ -13651,7 +13651,6 @@ declare function scroll(options?: ScrollToOptions): void;
13651
13651
declare function scrollTo ( options ?: ScrollToOptions ) : void ;
13652
13652
declare function scrollBy ( options ?: ScrollToOptions ) : void ;
13653
13653
declare function toString ( ) : string ;
13654
- declare function addEventListener ( type : string , listener ?: EventListenerOrEventListenerObject , useCapture ?: boolean ) : void ;
13655
13654
declare function dispatchEvent ( evt : Event ) : boolean ;
13656
13655
declare function removeEventListener ( type : string , listener ?: EventListenerOrEventListenerObject , useCapture ?: boolean ) : void ;
13657
13656
declare function clearInterval ( handle : number ) : void ;
Original file line number Diff line number Diff line change @@ -1226,7 +1226,6 @@ declare var self: WorkerGlobalScope;
1226
1226
declare function close ( ) : void ;
1227
1227
declare function msWriteProfilerMark ( profilerMarkName : string ) : void ;
1228
1228
declare function toString ( ) : string ;
1229
- declare function addEventListener ( type : string , listener ?: EventListenerOrEventListenerObject , useCapture ?: boolean ) : void ;
1230
1229
declare function dispatchEvent ( evt : Event ) : boolean ;
1231
1230
declare function removeEventListener ( type : string , listener ?: EventListenerOrEventListenerObject , useCapture ?: boolean ) : void ;
1232
1231
declare var indexedDB : IDBFactory ;
You can’t perform that action at this time.
0 commit comments