checkVisibility()Baseline · Widely available
The checkVisibility() method checks if an element is potentially visible, with optional parameters for the kinds of visibility to check. For example, it checks whether the element has the style display: none, but can also check for visibility: hidden.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Mar 5, 2024. Widely available since Sep 5, 2026.
Browser support
DesktopChrome
1–104Not supported
105+Supportedsince Sep 2, 2022
Current: 155Edge
12–104Not supported
105+Supportedsince Sep 1, 2022
Current: 154Firefox
1–105Not supported
106+Supportedsince Oct 18, 2022
Current: 157Safari
1–17.3Not supported
17.4+Supportedsince Mar 5, 2024
Current: 27MobileChrome Android
18–104Not supported
105+Supportedsince Sep 2, 2022
Current: 155Firefox Android
4–105Not supported
106+Supportedsince Oct 18, 2022
Current: 157Safari iOS
1–17.3Not supported
17.4+Supportedsince Mar 5, 2024
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: checkVisibility.
Feature detection
JS · check before using
if ("Element" in globalThis && "checkVisibility" in Element.prototype) {
// Element.checkVisibility is available
}Documentation (MDN)
Specification
Sub-features
Support for each part of the feature (6). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| Element.checkVisibility | 105 | 105 | 106 | 17.4 | 105 | 106 | 17.4 |
| Element.checkVisibility.options_checkOpacity_parameter | 105 | 105 | 106 | 17.4 | 105 | 106 | 17.4 |
| Element.checkVisibility.options_checkVisibilityCSS_parameter | 105 | 105 | 106 | 17.4 | 105 | 106 | 17.4 |
| Element.checkVisibility.options_contentVisibilityAuto_parameter | 121 | 121 | 122 | 17.4 | 121 | 122 | 17.4 |
| Element.checkVisibility.options_opacityProperty_parameter | 121 | 121 | 122 | 17.4 | 121 | 122 | 17.4 |
| Element.checkVisibility.options_visibilityProperty_parameter | 121 | 121 | 122 | 17.4 | 121 | 122 | 17.4 |