Skip to content

Commit 96e152c

Browse files
authored
Unhide showPopover/togglePopover options (#2266)
Co-authored-by: saschanaz <[email protected]>
1 parent ad91b6a commit 96e152c

File tree

6 files changed

+40
-38
lines changed

6 files changed

+40
-38
lines changed

baselines/dom.generated.d.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2201,6 +2201,10 @@ interface ShareData {
22012201
url?: string;
22022202
}
22032203

2204+
interface ShowPopoverOptions {
2205+
source?: HTMLElement;
2206+
}
2207+
22042208
interface SpeechRecognitionErrorEventInit extends EventInit {
22052209
error: SpeechRecognitionErrorCode;
22062210
message?: string;
@@ -2316,6 +2320,10 @@ interface ToggleEventInit extends EventInit {
23162320
source?: Element | null;
23172321
}
23182322

2323+
interface TogglePopoverOptions extends ShowPopoverOptions {
2324+
force?: boolean;
2325+
}
2326+
23192327
interface TouchEventInit extends EventModifierInit {
23202328
changedTouches?: Touch[];
23212329
targetTouches?: Touch[];
@@ -16104,13 +16112,13 @@ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEdit
1610416112
*
1610516113
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/showPopover)
1610616114
*/
16107-
showPopover(): void;
16115+
showPopover(options?: ShowPopoverOptions): void;
1610816116
/**
1610916117
* The **`togglePopover()`** method of the HTMLElement interface toggles a popover element (i.e., one that has a valid popover attribute) between the hidden and showing states.
1611016118
*
1611116119
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/togglePopover)
1611216120
*/
16113-
togglePopover(options?: boolean): boolean;
16121+
togglePopover(options?: TogglePopoverOptions | boolean): boolean;
1611416122
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1611516123
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1611616124
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;

baselines/ts5.5/dom.generated.d.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,6 +2198,10 @@ interface ShareData {
21982198
url?: string;
21992199
}
22002200

2201+
interface ShowPopoverOptions {
2202+
source?: HTMLElement;
2203+
}
2204+
22012205
interface SpeechRecognitionErrorEventInit extends EventInit {
22022206
error: SpeechRecognitionErrorCode;
22032207
message?: string;
@@ -2313,6 +2317,10 @@ interface ToggleEventInit extends EventInit {
23132317
source?: Element | null;
23142318
}
23152319

2320+
interface TogglePopoverOptions extends ShowPopoverOptions {
2321+
force?: boolean;
2322+
}
2323+
23162324
interface TouchEventInit extends EventModifierInit {
23172325
changedTouches?: Touch[];
23182326
targetTouches?: Touch[];
@@ -16088,13 +16096,13 @@ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEdit
1608816096
*
1608916097
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/showPopover)
1609016098
*/
16091-
showPopover(): void;
16099+
showPopover(options?: ShowPopoverOptions): void;
1609216100
/**
1609316101
* The **`togglePopover()`** method of the HTMLElement interface toggles a popover element (i.e., one that has a valid popover attribute) between the hidden and showing states.
1609416102
*
1609516103
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/togglePopover)
1609616104
*/
16097-
togglePopover(options?: boolean): boolean;
16105+
togglePopover(options?: TogglePopoverOptions | boolean): boolean;
1609816106
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1609916107
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1610016108
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;

baselines/ts5.6/dom.generated.d.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,6 +2198,10 @@ interface ShareData {
21982198
url?: string;
21992199
}
22002200

2201+
interface ShowPopoverOptions {
2202+
source?: HTMLElement;
2203+
}
2204+
22012205
interface SpeechRecognitionErrorEventInit extends EventInit {
22022206
error: SpeechRecognitionErrorCode;
22032207
message?: string;
@@ -2313,6 +2317,10 @@ interface ToggleEventInit extends EventInit {
23132317
source?: Element | null;
23142318
}
23152319

2320+
interface TogglePopoverOptions extends ShowPopoverOptions {
2321+
force?: boolean;
2322+
}
2323+
23162324
interface TouchEventInit extends EventModifierInit {
23172325
changedTouches?: Touch[];
23182326
targetTouches?: Touch[];
@@ -16101,13 +16109,13 @@ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEdit
1610116109
*
1610216110
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/showPopover)
1610316111
*/
16104-
showPopover(): void;
16112+
showPopover(options?: ShowPopoverOptions): void;
1610516113
/**
1610616114
* The **`togglePopover()`** method of the HTMLElement interface toggles a popover element (i.e., one that has a valid popover attribute) between the hidden and showing states.
1610716115
*
1610816116
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/togglePopover)
1610916117
*/
16110-
togglePopover(options?: boolean): boolean;
16118+
togglePopover(options?: TogglePopoverOptions | boolean): boolean;
1611116119
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1611216120
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1611316121
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;

baselines/ts5.9/dom.generated.d.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,6 +2198,10 @@ interface ShareData {
21982198
url?: string;
21992199
}
22002200

2201+
interface ShowPopoverOptions {
2202+
source?: HTMLElement;
2203+
}
2204+
22012205
interface SpeechRecognitionErrorEventInit extends EventInit {
22022206
error: SpeechRecognitionErrorCode;
22032207
message?: string;
@@ -2313,6 +2317,10 @@ interface ToggleEventInit extends EventInit {
23132317
source?: Element | null;
23142318
}
23152319

2320+
interface TogglePopoverOptions extends ShowPopoverOptions {
2321+
force?: boolean;
2322+
}
2323+
23162324
interface TouchEventInit extends EventModifierInit {
23172325
changedTouches?: Touch[];
23182326
targetTouches?: Touch[];
@@ -16101,13 +16109,13 @@ interface HTMLElement extends Element, ElementCSSInlineStyle, ElementContentEdit
1610116109
*
1610216110
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/showPopover)
1610316111
*/
16104-
showPopover(): void;
16112+
showPopover(options?: ShowPopoverOptions): void;
1610516113
/**
1610616114
* The **`togglePopover()`** method of the HTMLElement interface toggles a popover element (i.e., one that has a valid popover attribute) between the hidden and showing states.
1610716115
*
1610816116
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/togglePopover)
1610916117
*/
16110-
togglePopover(options?: boolean): boolean;
16118+
togglePopover(options?: TogglePopoverOptions | boolean): boolean;
1611116119
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1611216120
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1611316121
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;

inputfiles/overridingTypes.jsonc

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -312,23 +312,6 @@
312312
"nullable": false
313313
}
314314
}
315-
},
316-
"methods": {
317-
"method": {
318-
"togglePopover": {
319-
"signature": {
320-
"0": {
321-
"param": [
322-
{
323-
// dictionary support is Blink only as of 2024-11
324-
"name": "options",
325-
"type": "boolean"
326-
}
327-
]
328-
}
329-
}
330-
}
331-
}
332315
}
333316
},
334317
"MediaMetadata": {

inputfiles/removedTypes.jsonc

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -157,19 +157,6 @@
157157
}
158158
}
159159
},
160-
"HTMLElement": {
161-
"methods": {
162-
"method": {
163-
"showPopover": {
164-
"signature": {
165-
"0": {
166-
"param": ["options"] // Blink only as of 2024-11
167-
}
168-
}
169-
}
170-
}
171-
}
172-
},
173160
"IntersectionObserverEntry": {
174161
"constructor": null // WebKit-only as of 2024-07
175162
},

0 commit comments

Comments
 (0)