showPopOver()

Shows a pop-up.

Published on Updated on

The showPopUp() instance method of the Element interface shows a pop-up element.

Syntax

showPopUp()

Parameters

None.

Return value

Void.

Exceptions

NotSupportedError DOMException
Thrown if showPopOver() is called on an element that does not have a valid value of the popup attribute set on it.
InvalidStateError DOMException
Thrown if showPopOver() is called on a valid pop-up that is already shown.
InvalidStateError DOMException
Thrown if showPopOver() is called on a valid pop-up that is not connected to a document.

Example

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

Browser compatibility

See also

Updated on Improve article

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