The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
visibilityState property
Returns the visibility state of a webpage.
This property is read-only.
![]() |
Syntax
| JavaScript |
|---|
ptr = object.visibilityState |
Property values
Type: DOMString
A value corresponding to one of the following:
| Value | Condition |
|---|---|
|
The page is hidden. |
|
The page is in a preview state. |
|
The page is visible. |
Standards information
Remarks
Use the visibilitychange event to track changes to the visibility state.
See also
Show:
