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
23 changes: 21 additions & 2 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13142,7 +13142,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: DocumentOrGlobalOnErrorHandler;
/** [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 @@ -14183,6 +14183,12 @@ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEdit
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/togglePopover)
*/
togglePopover(options?: boolean): boolean;
/**
* 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 HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
Expand Down Expand Up @@ -27401,6 +27407,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 @@ -29763,6 +29775,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 @@ -39572,7 +39590,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: DocumentOrGlobalOnErrorHandler;
/** [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 @@ -39849,6 +39867,7 @@ type ConstrainDouble = number | ConstrainDoubleRange;
type ConstrainULong = number | ConstrainULongRange;
type CookieList = CookieListItem[];
type DOMHighResTimeStamp = number;
type DocumentOrGlobalOnErrorHandler = (((event: Event) => any) | ((event: UIEvent) => any) | OnErrorEventHandlerNonNull) | null;
type EpochTimeStamp = number;
type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
type FileSystemWriteChunkType = BufferSource | Blob | string | WriteParams;
Expand Down
23 changes: 21 additions & 2 deletions baselines/ts5.5/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13131,7 +13131,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: DocumentOrGlobalOnErrorHandler;
/** [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 @@ -14170,6 +14170,12 @@ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEdit
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/togglePopover)
*/
togglePopover(options?: boolean): boolean;
/**
* 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 HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
Expand Down Expand Up @@ -27379,6 +27385,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 @@ -29741,6 +29753,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 @@ -39549,7 +39567,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: DocumentOrGlobalOnErrorHandler;
/** [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 @@ -39826,6 +39844,7 @@ type ConstrainDouble = number | ConstrainDoubleRange;
type ConstrainULong = number | ConstrainULongRange;
type CookieList = CookieListItem[];
type DOMHighResTimeStamp = number;
type DocumentOrGlobalOnErrorHandler = (((event: Event) => any) | ((event: UIEvent) => any) | OnErrorEventHandlerNonNull) | null;
type EpochTimeStamp = number;
type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
type FileSystemWriteChunkType = BufferSource | Blob | string | WriteParams;
Expand Down
23 changes: 21 additions & 2 deletions baselines/ts5.6/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13142,7 +13142,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: DocumentOrGlobalOnErrorHandler;
/** [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 @@ -14183,6 +14183,12 @@ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEdit
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/togglePopover)
*/
togglePopover(options?: boolean): boolean;
/**
* 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 HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
Expand Down Expand Up @@ -27401,6 +27407,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 @@ -29763,6 +29775,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 @@ -39572,7 +39590,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: DocumentOrGlobalOnErrorHandler;
/** [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 @@ -39849,6 +39867,7 @@ type ConstrainDouble = number | ConstrainDoubleRange;
type ConstrainULong = number | ConstrainULongRange;
type CookieList = CookieListItem[];
type DOMHighResTimeStamp = number;
type DocumentOrGlobalOnErrorHandler = (((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 @@ -1216,6 +1216,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": "DocumentOrGlobalOnErrorHandler",
"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",
"DocumentOrGlobalOnErrorHandler",
"EcdhKeyDeriveParams",
"EcdsaParams",
"EcKeyAlgorithm",
Expand Down
28 changes: 28 additions & 0 deletions inputfiles/overridingTypes.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,14 @@
]
}
}
},
"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 Expand Up @@ -1281,6 +1289,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 @@ -1299,6 +1319,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=DocumentOrGlobalOnErrorHandler
}

interface-mixin MessageEventTarget {
Expand Down
Loading