Turns an element into a pop-up.
It can be used on any HTML element that makes sense as a pop-up.
The attribute can have any of the following values:
- The pop-up exhibits the standard behavior explained at The Pop-up API: concepts and usage.
- Manual pop-ups cannot be light dismissed, they can only be dismissed by an explicit trigger element (created for example using
hidePopOver()), and they don't automatically dismiss previously-shown pop-ups.
<p id="my-popup" popover>Hello!</p>
<p id="my-popup" popover="auto">Hello!</p>
<p id="my-popup" popover="manual">Hello!</p>
- The Pop-Up 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.