Creates a trigger element that shows an associated hidden pop-up.
popovershowtarget attribute creates a trigger element that shows an associated hidden pop-up.
The attribute takes a string value equal to the ID of the pop-up element that you want to show, to associate the two.
<button popovershowtarget="my-popup">Show pop-up</button>
- 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.