popoverhidetarget
Creates a trigger element that dismisses an associated shown popover.
Published on • Updated on
The popoverhidetarget
attribute creates a trigger element that dismisses an associated shown popover.
It can be used on the <button>
and <input>
elements.
Values
The attribute takes a string value equal to the ID of the popover element that you want to dismiss, to associate the two.
Example
<button popoverhidetarget="my-popover">Dismiss popover</button>
Browser compatibility
- The Popover API is planned for launch in Chrome 110, available in stable in early February 2023 (check the Chrome Roadmap for updates).
- It is enabled by default in Chrome Canary for local testing.
- Register for the Origin Trial if you want to test it in a production environment. Read Getting started with Chrome's origin trials for more information.
- There is a polyfill available at https://github.com/oddbird/popup-polyfill.
See also
Updated on • Improve article