popOver

Turns an element into a pop-up.

Published on Updated on

The popOver property of the Element interface turns an element into a pop-up. It is the DOM definition of the HTML popover attribute.

Value

A string that can take one of the following values:

auto
The pop-up exhibits the standard behavior explained at The Pop-up API: concepts and usage.
manual
Manual pop-ups cannot be light dismissed, they can only be dismissed by an explicit trigger element (created for example using popovertoggletarget) or by JavaScript (using hidePopOver()), and they don't automatically dismiss previously-shown pop-ups.

Example

const popup = document.getElementById('my-popup');

// get
popup.popOver;

// set
popup.popOver = 'manual';

Browser compatibility

See also

Updated on Improve article

We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.