hidePopOver()

Dismisses a pop-up.

Published on Updated on

The hidePopUp() instance method of the Element interface dismisses a pop-up element.

Syntax

hidePopOver()

Parameters

None.

Return value

Void.

Exceptions

NotSupportedError DOMException
Thrown if hidePopOver() is called on an element that does not have a valid value of the popup attribute set on it.
InvalidStateError DOMException
Thrown if hidePopOver() is called on a valid pop-up that is not currently showing.

Example

const popup = document.getElementById('my-popup');
popup.showPopOver(); // needs to be shown first

...

popup.hidePopOver();

Browser compatibility

See also

Updated on Improve article

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