-
Notifications
You must be signed in to change notification settings - Fork 458
Description
Summary
The argument to showPopover is removed, and the argument to togglePopover is overridden because they were only supported in Blink in Nov 2024 but now they are supported by at least Gecko
Expected vs. Actual Behavior
Expected: showPopover accepts an options argument, togglePopover accepts a dictionary argument
Actual: showPopover does not accept any arguments, and togglePopover only accepts a boolean
Playground Link
No response
Browser Support
- This API is supported in at least two major browser engines (not two Chromium-based browsers).
Have Tried The Latest Releases
- This issue applies to the latest release of TypeScript.
- This issue applies to the latest release of
@types/web.
Additional Context
showPopover drops the options argument:
TypeScript-DOM-lib-generator/inputfiles/removedTypes.jsonc
Lines 163 to 175 in 17a020b
| "HTMLElement": { | |
| "methods": { | |
| "method": { | |
| "showPopover": { | |
| "signature": { | |
| "0": { | |
| "param": ["options"] // Blink only as of 2024-11 | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, |
But this argument is supported by at least Gecko: https://searchfox.org/firefox-main/rev/f6e3ccb5853c46f917578697a488d48c3bc09ac8/dom/webidl/HTMLElement.webidl#79
BCD says Safari supports it too: https://github.com/mdn/browser-compat-data/blob/a3ab1a95367f1dcee3b59e4a6e0081595c5e3b4f/api/HTMLElement.json#L2426-L2483
Similarly for togglePopover, only a bool is supported:
TypeScript-DOM-lib-generator/inputfiles/overridingTypes.jsonc
Lines 320 to 332 in 17a020b
| "togglePopover": { | |
| "signature": { | |
| "0": { | |
| "param": [ | |
| { | |
| // dictionary support is Blink only as of 2024-11 | |
| "name": "options", | |
| "type": "boolean" | |
| } | |
| ] | |
| } | |
| } | |
| } |
However, Gecko appears to support the dictionary form: https://searchfox.org/firefox-main/rev/f6e3ccb5853c46f917578697a488d48c3bc09ac8/dom/webidl/HTMLElement.webidl#81
BCD says Safari supports it too: https://github.com/mdn/browser-compat-data/blob/a3ab1a95367f1dcee3b59e4a6e0081595c5e3b4f/api/HTMLElement.json#L2960-L3052
Appears to come from 3bd3006