Skip to content

Support toggle and beforetoggle event types #1989

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
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
12 changes: 6 additions & 6 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10092,7 +10092,7 @@ interface GlobalEventHandlersEventMap {
"animationstart": AnimationEvent;
"auxclick": PointerEvent;
"beforeinput": InputEvent;
"beforetoggle": Event;
"beforetoggle": ToggleEvent;
"blur": FocusEvent;
"cancel": Event;
"canplay": Event;
Expand Down Expand Up @@ -10172,7 +10172,7 @@ interface GlobalEventHandlersEventMap {
"submit": SubmitEvent;
"suspend": Event;
"timeupdate": Event;
"toggle": Event;
"toggle": ToggleEvent;
"touchcancel": TouchEvent;
"touchend": TouchEvent;
"touchmove": TouchEvent;
Expand Down Expand Up @@ -10211,7 +10211,7 @@ interface GlobalEventHandlers {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/beforeinput_event) */
onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/beforetoggle_event) */
onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
onbeforetoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
/**
* Fires when the object loses the input focus.
* @param ev The focus event.
Expand Down Expand Up @@ -10572,7 +10572,7 @@ interface GlobalEventHandlers {
*/
ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/toggle_event) */
ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/touchcancel_event) */
ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/touchend_event) */
Expand Down Expand Up @@ -30165,7 +30165,7 @@ declare var onauxclick: ((this: Window, ev: PointerEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/beforeinput_event) */
declare var onbeforeinput: ((this: Window, ev: InputEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/beforetoggle_event) */
declare var onbeforetoggle: ((this: Window, ev: Event) => any) | null;
declare var onbeforetoggle: ((this: Window, ev: ToggleEvent) => any) | null;
/**
* Fires when the object loses the input focus.
* @param ev The focus event.
Expand Down Expand Up @@ -30526,7 +30526,7 @@ declare var onsuspend: ((this: Window, ev: Event) => any) | null;
*/
declare var ontimeupdate: ((this: Window, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/toggle_event) */
declare var ontoggle: ((this: Window, ev: Event) => any) | null;
declare var ontoggle: ((this: Window, ev: ToggleEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/touchcancel_event) */
declare var ontouchcancel: ((this: Window, ev: TouchEvent) => any) | null | undefined;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/touchend_event) */
Expand Down
12 changes: 6 additions & 6 deletions baselines/ts5.5/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10082,7 +10082,7 @@ interface GlobalEventHandlersEventMap {
"animationstart": AnimationEvent;
"auxclick": PointerEvent;
"beforeinput": InputEvent;
"beforetoggle": Event;
"beforetoggle": ToggleEvent;
"blur": FocusEvent;
"cancel": Event;
"canplay": Event;
Expand Down Expand Up @@ -10162,7 +10162,7 @@ interface GlobalEventHandlersEventMap {
"submit": SubmitEvent;
"suspend": Event;
"timeupdate": Event;
"toggle": Event;
"toggle": ToggleEvent;
"touchcancel": TouchEvent;
"touchend": TouchEvent;
"touchmove": TouchEvent;
Expand Down Expand Up @@ -10201,7 +10201,7 @@ interface GlobalEventHandlers {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/beforeinput_event) */
onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/beforetoggle_event) */
onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
onbeforetoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
/**
* Fires when the object loses the input focus.
* @param ev The focus event.
Expand Down Expand Up @@ -10562,7 +10562,7 @@ interface GlobalEventHandlers {
*/
ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/toggle_event) */
ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/touchcancel_event) */
ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/touchend_event) */
Expand Down Expand Up @@ -30143,7 +30143,7 @@ declare var onauxclick: ((this: Window, ev: PointerEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/beforeinput_event) */
declare var onbeforeinput: ((this: Window, ev: InputEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/beforetoggle_event) */
declare var onbeforetoggle: ((this: Window, ev: Event) => any) | null;
declare var onbeforetoggle: ((this: Window, ev: ToggleEvent) => any) | null;
/**
* Fires when the object loses the input focus.
* @param ev The focus event.
Expand Down Expand Up @@ -30504,7 +30504,7 @@ declare var onsuspend: ((this: Window, ev: Event) => any) | null;
*/
declare var ontimeupdate: ((this: Window, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/toggle_event) */
declare var ontoggle: ((this: Window, ev: Event) => any) | null;
declare var ontoggle: ((this: Window, ev: ToggleEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/touchcancel_event) */
declare var ontouchcancel: ((this: Window, ev: TouchEvent) => any) | null | undefined;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/touchend_event) */
Expand Down
12 changes: 6 additions & 6 deletions baselines/ts5.6/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10092,7 +10092,7 @@ interface GlobalEventHandlersEventMap {
"animationstart": AnimationEvent;
"auxclick": PointerEvent;
"beforeinput": InputEvent;
"beforetoggle": Event;
"beforetoggle": ToggleEvent;
"blur": FocusEvent;
"cancel": Event;
"canplay": Event;
Expand Down Expand Up @@ -10172,7 +10172,7 @@ interface GlobalEventHandlersEventMap {
"submit": SubmitEvent;
"suspend": Event;
"timeupdate": Event;
"toggle": Event;
"toggle": ToggleEvent;
"touchcancel": TouchEvent;
"touchend": TouchEvent;
"touchmove": TouchEvent;
Expand Down Expand Up @@ -10211,7 +10211,7 @@ interface GlobalEventHandlers {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/beforeinput_event) */
onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/beforetoggle_event) */
onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
onbeforetoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
/**
* Fires when the object loses the input focus.
* @param ev The focus event.
Expand Down Expand Up @@ -10572,7 +10572,7 @@ interface GlobalEventHandlers {
*/
ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/toggle_event) */
ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
ontoggle: ((this: GlobalEventHandlers, ev: ToggleEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/touchcancel_event) */
ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/touchend_event) */
Expand Down Expand Up @@ -30165,7 +30165,7 @@ declare var onauxclick: ((this: Window, ev: PointerEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/beforeinput_event) */
declare var onbeforeinput: ((this: Window, ev: InputEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/beforetoggle_event) */
declare var onbeforetoggle: ((this: Window, ev: Event) => any) | null;
declare var onbeforetoggle: ((this: Window, ev: ToggleEvent) => any) | null;
/**
* Fires when the object loses the input focus.
* @param ev The focus event.
Expand Down Expand Up @@ -30526,7 +30526,7 @@ declare var onsuspend: ((this: Window, ev: Event) => any) | null;
*/
declare var ontimeupdate: ((this: Window, ev: Event) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/toggle_event) */
declare var ontoggle: ((this: Window, ev: Event) => any) | null;
declare var ontoggle: ((this: Window, ev: ToggleEvent) => any) | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/touchcancel_event) */
declare var ontouchcancel: ((this: Window, ev: TouchEvent) => any) | null | undefined;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/touchend_event) */
Expand Down
8 changes: 8 additions & 0 deletions inputfiles/addedTypes.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,14 @@
{
"name": "contextmenu",
"type": "MouseEvent"
},
{
"name": "toggle",
"type": "ToggleEvent"
},
{
"name": "beforetoggle",
"type": "ToggleEvent"
}
]
}
Expand Down