DOM Methods
HTMLElement.showPopover()
Opens a valid popover in the top layer. The element must be a valid popover and satisfy state requirements. It does not create modal behavior; provide a suitable invoker and accessible interaction. Example result: true.
Formal Syntax & Structure
html syntaxhtml
element.showPopover(options)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| options | object | Optional source element for the invoking context, verify support independently. |
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(); 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.showPopover 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