diff --git a/menu/internal/controllers/surfacePositionController.ts b/menu/internal/controllers/surfacePositionController.ts index cc9e184f38..584b4b64cf 100644 --- a/menu/internal/controllers/surfacePositionController.ts +++ b/menu/internal/controllers/surfacePositionController.ts @@ -7,6 +7,20 @@ import {ReactiveController, ReactiveControllerHost} from 'lit'; import {StyleInfo} from 'lit/directives/style-map.js'; +/** + * Declare popoverAPI functions. See + * https://developer.mozilla.org/en-US/docs/Web/API/Popover_API + * Without this, closure will rename these functions. Can remove once these + * functions make it into the typescript lib. + */ +declare global { + interface HTMLElement { + showPopover(): void; + hidePopover(): void; + togglePopover(force: boolean): void; + } +} + /** * An enum of supported Menu corners */