File tree Expand file tree Collapse file tree 3 files changed +3
-9
lines changed Expand file tree Collapse file tree 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) =
329329 let emitMethodFromJson ( m : ItemsType.Root ) =
330330 m.Signatures |> Array.iter ( Pt.printl " %s%s ;" prefix)
331331
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.
338334 let mFilter ( m : Browser.Method ) =
339335 matchScope emitScope m &&
340- not ( hasEventHandlers && OptionCheckValue " addEventListener" m.Name)
336+ not ( prefix <> " " && OptionCheckValue " addEventListener" m.Name)
341337
342338 if i.Methods.IsSome then
343339 i.Methods.Value.Methods
Original file line number Diff line number Diff line change @@ -13651,7 +13651,6 @@ declare function scroll(options?: ScrollToOptions): void;
1365113651declare function scrollTo ( options ?: ScrollToOptions ) : void ;
1365213652declare function scrollBy ( options ?: ScrollToOptions ) : void ;
1365313653declare function toString ( ) : string ;
13654- declare function addEventListener ( type : string , listener ?: EventListenerOrEventListenerObject , useCapture ?: boolean ) : void ;
1365513654declare function dispatchEvent ( evt : Event ) : boolean ;
1365613655declare function removeEventListener ( type : string , listener ?: EventListenerOrEventListenerObject , useCapture ?: boolean ) : void ;
1365713656declare function clearInterval ( handle : number ) : void ;
Original file line number Diff line number Diff line change @@ -1226,7 +1226,6 @@ declare var self: WorkerGlobalScope;
12261226declare function close ( ) : void ;
12271227declare function msWriteProfilerMark ( profilerMarkName : string ) : void ;
12281228declare function toString ( ) : string ;
1229- declare function addEventListener ( type : string , listener ?: EventListenerOrEventListenerObject , useCapture ?: boolean ) : void ;
12301229declare function dispatchEvent ( evt : Event ) : boolean ;
12311230declare function removeEventListener ( type : string , listener ?: EventListenerOrEventListenerObject , useCapture ?: boolean ) : void ;
12321231declare var indexedDB : IDBFactory ;
You can’t perform that action at this time.
0 commit comments