DOM Methods

HTMLElement.hidePopover()

Closes a currently shown popover. Removes it from the top layer according to the native popover algorithm. Calling it on an element without valid popover configuration can throw; test for API support for progressive enhancement. Example result: false.

Formal Syntax & Structure

html syntaxhtml
element.hidePopover()

Return Value

undefined

No return value.

Working Example

Example Snippethtml
<div id="demo" popover>Note</div><p>  Result:  <output id="result"></output></p><script>  const e = document.getElementById('demo');  const result = value => { document.getElementById("result").textContent = String(value); };  e.showPopover(); e.hidePopover(); result(e.matches(':popover-open'));</script>

Browser Compatibility

Minimum supported versions across modern rendering engines

Chrome
114
Yes
Firefox
125
Yes
Safari
17
Yes
Checked desktop BCD snapshot: HTMLElement.hidePopover base method only. Versions denote the recorded start of support (≤ means at least that early), not a guarantee of all behavior. Unresolved mirror and preview rows omitted. Options and return behavior can have separate compatibility rows.
HTML Living Standard
HTML Reference