Skip to content

Use @webref/events to detect event types #1660

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Sep 5, 2024
Merged
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
48 changes: 24 additions & 24 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2543,7 +2543,7 @@ interface Animatable {
interface AnimationEventMap {
"cancel": AnimationPlaybackEvent;
"finish": AnimationPlaybackEvent;
"remove": Event;
"remove": AnimationPlaybackEvent;
}

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation) */
Expand All @@ -2561,7 +2561,7 @@ interface Animation extends EventTarget {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation/finish_event) */
onfinish: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation/remove_event) */
onremove: ((this: Animation, ev: Event) => any) | null;
onremove: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation/pending) */
readonly pending: boolean;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Animation/playState) */
Expand Down Expand Up @@ -3003,7 +3003,7 @@ declare var AudioWorklet: {
};

interface AudioWorkletNodeEventMap {
"processorerror": Event;
"processorerror": ErrorEvent;
}

/**
Expand All @@ -3013,7 +3013,7 @@ interface AudioWorkletNodeEventMap {
*/
interface AudioWorkletNode extends AudioNode {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletNode/processorerror_event) */
onprocessorerror: ((this: AudioWorkletNode, ev: Event) => any) | null;
onprocessorerror: ((this: AudioWorkletNode, ev: ErrorEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletNode/parameters) */
readonly parameters: AudioParamMap;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioWorkletNode/port) */
Expand Down Expand Up @@ -8811,19 +8811,19 @@ declare var FontFace: {
};

interface FontFaceSetEventMap {
"loading": Event;
"loadingdone": Event;
"loadingerror": Event;
"loading": FontFaceSetLoadEvent;
"loadingdone": FontFaceSetLoadEvent;
"loadingerror": FontFaceSetLoadEvent;
}

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet) */
interface FontFaceSet extends EventTarget {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loading_event) */
onloading: ((this: FontFaceSet, ev: Event) => any) | null;
onloading: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingdone_event) */
onloadingdone: ((this: FontFaceSet, ev: Event) => any) | null;
onloadingdone: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingerror_event) */
onloadingerror: ((this: FontFaceSet, ev: Event) => any) | null;
onloadingerror: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/ready) */
readonly ready: Promise<FontFaceSet>;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/status) */
Expand Down Expand Up @@ -13279,8 +13279,8 @@ declare var HTMLUnknownElement: {
};

interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap {
"enterpictureinpicture": Event;
"leavepictureinpicture": Event;
"enterpictureinpicture": PictureInPictureEvent;
"leavepictureinpicture": PictureInPictureEvent;
}

/**
Expand All @@ -13298,9 +13298,9 @@ interface HTMLVideoElement extends HTMLMediaElement {
*/
height: number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/enterpictureinpicture_event) */
onenterpictureinpicture: ((this: HTMLVideoElement, ev: Event) => any) | null;
onenterpictureinpicture: ((this: HTMLVideoElement, ev: PictureInPictureEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/leavepictureinpicture_event) */
onleavepictureinpicture: ((this: HTMLVideoElement, ev: Event) => any) | null;
onleavepictureinpicture: ((this: HTMLVideoElement, ev: PictureInPictureEvent) => any) | null;
/** Gets or sets the playsinline of the video element. for example, On iPhone, video elements will now be allowed to play inline, and will not automatically enter fullscreen mode when playback begins. */
playsInline: boolean;
/**
Expand Down Expand Up @@ -14591,7 +14591,7 @@ declare var LockManager: {
};

interface MIDIAccessEventMap {
"statechange": Event;
"statechange": MIDIConnectionEvent;
}

/**
Expand All @@ -14603,7 +14603,7 @@ interface MIDIAccess extends EventTarget {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIAccess/inputs) */
readonly inputs: MIDIInputMap;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIAccess/statechange_event) */
onstatechange: ((this: MIDIAccess, ev: Event) => any) | null;
onstatechange: ((this: MIDIAccess, ev: MIDIConnectionEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIAccess/outputs) */
readonly outputs: MIDIOutputMap;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIAccess/sysexEnabled) */
Expand Down Expand Up @@ -15114,7 +15114,7 @@ declare var MediaQueryListEvent: {

interface MediaRecorderEventMap {
"dataavailable": BlobEvent;
"error": Event;
"error": ErrorEvent;
"pause": Event;
"resume": Event;
"start": Event;
Expand All @@ -15130,7 +15130,7 @@ interface MediaRecorder extends EventTarget {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaRecorder/dataavailable_event) */
ondataavailable: ((this: MediaRecorder, ev: BlobEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaRecorder/error_event) */
onerror: ((this: MediaRecorder, ev: Event) => any) | null;
onerror: ((this: MediaRecorder, ev: ErrorEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaRecorder/pause_event) */
onpause: ((this: MediaRecorder, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaRecorder/resume_event) */
Expand Down Expand Up @@ -16883,7 +16883,7 @@ declare var PaymentMethodChangeEvent: {
};

interface PaymentRequestEventMap {
"paymentmethodchange": Event;
"paymentmethodchange": PaymentMethodChangeEvent;
"shippingaddresschange": Event;
"shippingoptionchange": Event;
}
Expand All @@ -16898,7 +16898,7 @@ interface PaymentRequest extends EventTarget {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/id) */
readonly id: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PaymentRequest/paymentmethodchange_event) */
onpaymentmethodchange: ((this: PaymentRequest, ev: Event) => any) | null;
onpaymentmethodchange: ((this: PaymentRequest, ev: PaymentMethodChangeEvent) => any) | null;
/**
* @deprecated
*
Expand Down Expand Up @@ -17917,7 +17917,7 @@ interface RTCDataChannelEventMap {
"bufferedamountlow": Event;
"close": Event;
"closing": Event;
"error": Event;
"error": RTCErrorEvent;
"message": MessageEvent;
"open": Event;
}
Expand Down Expand Up @@ -17947,7 +17947,7 @@ interface RTCDataChannel extends EventTarget {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/closing_event) */
onclosing: ((this: RTCDataChannel, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/error_event) */
onerror: ((this: RTCDataChannel, ev: Event) => any) | null;
onerror: ((this: RTCDataChannel, ev: RTCErrorEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/message_event) */
onmessage: ((this: RTCDataChannel, ev: MessageEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDataChannel/open_event) */
Expand Down Expand Up @@ -17988,7 +17988,7 @@ declare var RTCDataChannelEvent: {
};

interface RTCDtlsTransportEventMap {
"error": Event;
"error": RTCErrorEvent;
"statechange": Event;
}

Expand All @@ -17997,7 +17997,7 @@ interface RTCDtlsTransport extends EventTarget {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDtlsTransport/iceTransport) */
readonly iceTransport: RTCIceTransport;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDtlsTransport/error_event) */
onerror: ((this: RTCDtlsTransport, ev: Event) => any) | null;
onerror: ((this: RTCDtlsTransport, ev: RTCErrorEvent) => any) | null;
onstatechange: ((this: RTCDtlsTransport, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCDtlsTransport/state) */
readonly state: RTCDtlsTransportState;
Expand Down
12 changes: 6 additions & 6 deletions baselines/serviceworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2716,19 +2716,19 @@ declare var FontFace: {
};

interface FontFaceSetEventMap {
"loading": Event;
"loadingdone": Event;
"loadingerror": Event;
"loading": FontFaceSetLoadEvent;
"loadingdone": FontFaceSetLoadEvent;
"loadingerror": FontFaceSetLoadEvent;
}

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet) */
interface FontFaceSet extends EventTarget {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loading_event) */
onloading: ((this: FontFaceSet, ev: Event) => any) | null;
onloading: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingdone_event) */
onloadingdone: ((this: FontFaceSet, ev: Event) => any) | null;
onloadingdone: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingerror_event) */
onloadingerror: ((this: FontFaceSet, ev: Event) => any) | null;
onloadingerror: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/ready) */
readonly ready: Promise<FontFaceSet>;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/status) */
Expand Down
12 changes: 6 additions & 6 deletions baselines/sharedworker.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2605,19 +2605,19 @@ declare var FontFace: {
};

interface FontFaceSetEventMap {
"loading": Event;
"loadingdone": Event;
"loadingerror": Event;
"loading": FontFaceSetLoadEvent;
"loadingdone": FontFaceSetLoadEvent;
"loadingerror": FontFaceSetLoadEvent;
}

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet) */
interface FontFaceSet extends EventTarget {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loading_event) */
onloading: ((this: FontFaceSet, ev: Event) => any) | null;
onloading: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingdone_event) */
onloadingdone: ((this: FontFaceSet, ev: Event) => any) | null;
onloadingdone: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingerror_event) */
onloadingerror: ((this: FontFaceSet, ev: Event) => any) | null;
onloadingerror: ((this: FontFaceSet, ev: FontFaceSetLoadEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/ready) */
readonly ready: Promise<FontFaceSet>;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/status) */
Expand Down
Loading
Loading