Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15071,7 +15071,7 @@ interface GlobalEventHandlers {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/ended_event) */
onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/error_event) */
onerror: OnErrorEventHandler;
onerror: DocumentOrGlobalOnErrorEventHandler;
Copy link
Collaborator

@saschanaz saschanaz Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also affects all other interfaces so it partially repeats the same issue of OnErrorEventHandler, and also not quite I suggested in #2148 (comment)...

I was thinking about:

interface DocumentOrElementEventHandlers extends GlobalEventHandlers {
  onerror: ((this: GlobalEventHandlers, ev: Event) => any) | null;
};

And make others inherit this instead of GlobalEventHandlers when appropriate. Wdyt?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But that as-is has an assignability issue. Hmm.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do have extendConflictsBaseTypes in emitter.ts which can help here... it's sad to add more there but it does make sense here.

Copy link
Collaborator

@saschanaz saschanaz Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing so would make subinterfaces to fail to assign to a variable typed as GlobalEventHandlers, which is a bit worrisome.

Hmmmmm. Maybe a better way is to make it reversed?

interface GlobalEventHandlers {
  // remove OnErrorEventHandler and make it general here  
  onerror: ((this: GlobalEventHandlers, ev: Event) => any) | null;
}

interface GlobalErrorEventHandlers extends GlobalEventHandlers {
  onerror: OnErrorEventHandler;
}

// Make global interfaces extend GlobalErrorEventHandlers instead of GlobalEventHandlers.
// Ideally this should be replaced automatically by emitter than overridingTypes, as
// the latter wouldn't support any upcoming new globals.
// Checking `global` property for each interface should allow it. 
interface Window extends GlobalErrorEventHandlers {
  // ...
}

Copy link
Collaborator

@saschanaz saschanaz Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Err. Actually if we are going to check globals then we don't need GlobalErrorEventHandlers at all. The emitter can just add an overridden onerror property directly to each global interface.

interface GlobalEventHandlers {
  // Remove OnErrorEventHandler and make it general here.
  // Replacing it to a general EventHandler would do this automatically.
  onerror: ((this: GlobalEventHandlers, ev: Event) => any) | null;
}

interface Window extends GlobalEventHandlers {
  onerror: OnErrorEventHandler;
}

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/focus_event) */
onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/formdata_event) */
Expand Down Expand Up @@ -29370,6 +29370,12 @@ interface SVGElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGElement/viewportElement)
*/
readonly viewportElement: SVGElement | null;
/**
* The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
*
* [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
*/
addEventListener(type: string, listener: ((event: Event) => void) | ((event: UIEvent) => void)): void;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not quite right as this affects all other events. And still not sure about UIEvent:

  1. MDN's description is a copypaste of what UI Events spec says in https://w3c.github.io/uievents/#event-type-error:

    UIEvent if generated from a user interface, Event otherwise.

  2. But then the same spec says otherwise in https://w3c.github.io/uievents/#event-types-list, where it only says Error for error event. So does HTML in https://html.spec.whatwg.org/multipage/webappapis.html#event-handlers-on-elements,-document-objects,-and-window-objects.
  3. Nothing in UI Events says exactly when UIEvent is used for error event.
  4. UI Events also argues load event uses UIEvent, which is untrue.
  5. UI Events hasn't been well maintained, see also the "Future of UI Events" discussion in https://docs.google.com/document/d/1fOjXiGUFf_krkfYaWf5drbqzY7CTxn7EcDYr5ZWjzFg/preview.

So I'd like to suggest excluding UIEvent in this PR.

addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
Expand Down Expand Up @@ -31734,6 +31740,12 @@ interface SVGSVGElement extends SVGGraphicsElement, SVGFitToViewBox, WindowEvent
unsuspendRedraw(suspendHandleID: number): void;
/** @deprecated */
unsuspendRedrawAll(): void;
/**
* The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
*
* [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
*/
addEventListener(type: string, listener: ((event: Event) => void) | ((event: UIEvent) => void)): void;
addEventListener<K extends keyof SVGSVGElementEventMap>(type: K, listener: (this: SVGSVGElement, ev: SVGSVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof SVGSVGElementEventMap>(type: K, listener: (this: SVGSVGElement, ev: SVGSVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
Expand Down Expand Up @@ -41635,7 +41647,7 @@ declare var onemptied: ((this: Window, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/ended_event) */
declare var onended: ((this: Window, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/error_event) */
declare var onerror: OnErrorEventHandler;
declare var onerror: DocumentOrGlobalOnErrorEventHandler;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/focus_event) */
declare var onfocus: ((this: Window, ev: FocusEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/formdata_event) */
Expand Down Expand Up @@ -41912,6 +41924,7 @@ type ConstrainDouble = number | ConstrainDoubleRange;
type ConstrainULong = number | ConstrainULongRange;
type CookieList = CookieListItem[];
type DOMHighResTimeStamp = number;
type DocumentOrGlobalOnErrorEventHandler = (((event: Event) => any) | ((event: UIEvent) => any) | OnErrorEventHandlerNonNull) | null;
type EpochTimeStamp = number;
type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
type FileSystemWriteChunkType = BufferSource | Blob | string | WriteParams;
Expand Down
17 changes: 15 additions & 2 deletions baselines/ts5.5/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15057,7 +15057,7 @@ interface GlobalEventHandlers {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/ended_event) */
onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/error_event) */
onerror: OnErrorEventHandler;
onerror: DocumentOrGlobalOnErrorEventHandler;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/focus_event) */
onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/formdata_event) */
Expand Down Expand Up @@ -29345,6 +29345,12 @@ interface SVGElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGElement/viewportElement)
*/
readonly viewportElement: SVGElement | null;
/**
* The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
*
* [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
*/
addEventListener(type: string, listener: ((event: Event) => void) | ((event: UIEvent) => void)): void;
addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
Expand Down Expand Up @@ -31709,6 +31715,12 @@ interface SVGSVGElement extends SVGGraphicsElement, SVGFitToViewBox, WindowEvent
unsuspendRedraw(suspendHandleID: number): void;
/** @deprecated */
unsuspendRedrawAll(): void;
/**
* The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
*
* [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
*/
addEventListener(type: string, listener: ((event: Event) => void) | ((event: UIEvent) => void)): void;
addEventListener<K extends keyof SVGSVGElementEventMap>(type: K, listener: (this: SVGSVGElement, ev: SVGSVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof SVGSVGElementEventMap>(type: K, listener: (this: SVGSVGElement, ev: SVGSVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
Expand Down Expand Up @@ -41609,7 +41621,7 @@ declare var onemptied: ((this: Window, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/ended_event) */
declare var onended: ((this: Window, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/error_event) */
declare var onerror: OnErrorEventHandler;
declare var onerror: DocumentOrGlobalOnErrorEventHandler;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/focus_event) */
declare var onfocus: ((this: Window, ev: FocusEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/formdata_event) */
Expand Down Expand Up @@ -41886,6 +41898,7 @@ type ConstrainDouble = number | ConstrainDoubleRange;
type ConstrainULong = number | ConstrainULongRange;
type CookieList = CookieListItem[];
type DOMHighResTimeStamp = number;
type DocumentOrGlobalOnErrorEventHandler = (((event: Event) => any) | ((event: UIEvent) => any) | OnErrorEventHandlerNonNull) | null;
type EpochTimeStamp = number;
type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
type FileSystemWriteChunkType = BufferSource | Blob | string | WriteParams;
Expand Down
17 changes: 15 additions & 2 deletions baselines/ts5.6/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15068,7 +15068,7 @@ interface GlobalEventHandlers {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/ended_event) */
onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/error_event) */
onerror: OnErrorEventHandler;
onerror: DocumentOrGlobalOnErrorEventHandler;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/focus_event) */
onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/formdata_event) */
Expand Down Expand Up @@ -29367,6 +29367,12 @@ interface SVGElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGElement/viewportElement)
*/
readonly viewportElement: SVGElement | null;
/**
* The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
*
* [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
*/
addEventListener(type: string, listener: ((event: Event) => void) | ((event: UIEvent) => void)): void;
addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
Expand Down Expand Up @@ -31731,6 +31737,12 @@ interface SVGSVGElement extends SVGGraphicsElement, SVGFitToViewBox, WindowEvent
unsuspendRedraw(suspendHandleID: number): void;
/** @deprecated */
unsuspendRedrawAll(): void;
/**
* The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
*
* [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
*/
addEventListener(type: string, listener: ((event: Event) => void) | ((event: UIEvent) => void)): void;
addEventListener<K extends keyof SVGSVGElementEventMap>(type: K, listener: (this: SVGSVGElement, ev: SVGSVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof SVGSVGElementEventMap>(type: K, listener: (this: SVGSVGElement, ev: SVGSVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
Expand Down Expand Up @@ -41632,7 +41644,7 @@ declare var onemptied: ((this: Window, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/ended_event) */
declare var onended: ((this: Window, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/error_event) */
declare var onerror: OnErrorEventHandler;
declare var onerror: DocumentOrGlobalOnErrorEventHandler;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/focus_event) */
declare var onfocus: ((this: Window, ev: FocusEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/formdata_event) */
Expand Down Expand Up @@ -41909,6 +41921,7 @@ type ConstrainDouble = number | ConstrainDoubleRange;
type ConstrainULong = number | ConstrainULongRange;
type CookieList = CookieListItem[];
type DOMHighResTimeStamp = number;
type DocumentOrGlobalOnErrorEventHandler = (((event: Event) => any) | ((event: UIEvent) => any) | OnErrorEventHandlerNonNull) | null;
type EpochTimeStamp = number;
type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
type FileSystemWriteChunkType = BufferSource | Blob | string | WriteParams;
Expand Down
17 changes: 15 additions & 2 deletions baselines/ts5.9/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15068,7 +15068,7 @@ interface GlobalEventHandlers {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/ended_event) */
onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/error_event) */
onerror: OnErrorEventHandler;
onerror: DocumentOrGlobalOnErrorEventHandler;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/focus_event) */
onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/formdata_event) */
Expand Down Expand Up @@ -29367,6 +29367,12 @@ interface SVGElement extends Element, ElementCSSInlineStyle, GlobalEventHandlers
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SVGElement/viewportElement)
*/
readonly viewportElement: SVGElement | null;
/**
* The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
*
* [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
*/
addEventListener(type: string, listener: ((event: Event) => void) | ((event: UIEvent) => void)): void;
addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
Expand Down Expand Up @@ -31731,6 +31737,12 @@ interface SVGSVGElement extends SVGGraphicsElement, SVGFitToViewBox, WindowEvent
unsuspendRedraw(suspendHandleID: number): void;
/** @deprecated */
unsuspendRedrawAll(): void;
/**
* The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
*
* [MDN Reference](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
*/
addEventListener(type: string, listener: ((event: Event) => void) | ((event: UIEvent) => void)): void;
addEventListener<K extends keyof SVGSVGElementEventMap>(type: K, listener: (this: SVGSVGElement, ev: SVGSVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof SVGSVGElementEventMap>(type: K, listener: (this: SVGSVGElement, ev: SVGSVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
Expand Down Expand Up @@ -41632,7 +41644,7 @@ declare var onemptied: ((this: Window, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/ended_event) */
declare var onended: ((this: Window, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/error_event) */
declare var onerror: OnErrorEventHandler;
declare var onerror: DocumentOrGlobalOnErrorEventHandler;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/focus_event) */
declare var onfocus: ((this: Window, ev: FocusEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLFormElement/formdata_event) */
Expand Down Expand Up @@ -41909,6 +41921,7 @@ type ConstrainDouble = number | ConstrainDoubleRange;
type ConstrainULong = number | ConstrainULongRange;
type CookieList = CookieListItem[];
type DOMHighResTimeStamp = number;
type DocumentOrGlobalOnErrorEventHandler = (((event: Event) => any) | ((event: UIEvent) => any) | OnErrorEventHandlerNonNull) | null;
type EpochTimeStamp = number;
type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
type FileSystemWriteChunkType = BufferSource | Blob | string | WriteParams;
Expand Down
6 changes: 6 additions & 0 deletions inputfiles/addedTypes.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,12 @@
// Full spec at https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill.
"name": "AutoFill",
"overrideType": "AutoFillBase | `${OptionalPrefixToken<AutoFillSection>}${OptionalPrefixToken<AutoFillAddressKind>}${AutoFillField}${OptionalPostfixToken<AutoFillCredentialField>}`"
},
{
"name": "DocumentOrGlobalOnErrorEventHandler",
"nullable": true,
"overrideType": "((event: Event) => any) | ((event: UIEvent) => any) | OnErrorEventHandlerNonNull",
"exposed": "Window"
}
]
}
Expand Down
1 change: 1 addition & 0 deletions inputfiles/knownTypes.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"CompositeOperationOrAuto",
"ComputedKeyframe",
"DisplayCaptureSurfaceType",
"DocumentOrGlobalOnErrorEventHandler",
"EcdhKeyDeriveParams",
"EcdsaParams",
"EcKeyAlgorithm",
Expand Down
20 changes: 20 additions & 0 deletions inputfiles/overridingTypes.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,18 @@
"type": "any"
}
}
},
"methods": {
"method": {
"addEventListener": {
"mdnUrl": "https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener",
"comment": "The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.",
"overrideSignatures": [
"addEventListener(type: string, listener: ((event: Event) => void) | ((event: UIEvent) => void)): void"
]

}
}
}
},
"SVGSVGElement": {
Expand All @@ -1188,6 +1200,14 @@
"overrideType": "NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>"
}
}
},
"addEventListener": {
"mdnUrl": "https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener",
"comment": "The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.",
"overrideSignatures": [
"addEventListener(type: string, listener: ((event: Event) => void) | ((event: UIEvent) => void)): void"
]

}
}
}
Expand Down
2 changes: 1 addition & 1 deletion inputfiles/patches/events.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ interface-mixin GlobalEventHandlers {
event transitionstart type=TransitionEvent
event transitionend type=TransitionEvent
event transitioncancel type=TransitionEvent
property onerror overrideType=OnErrorEventHandler
property onerror overrideType=DocumentOrGlobalOnErrorEventHandler
}

interface-mixin MessageEventTarget {
Expand Down
Loading