Newly available Newly available. Verify your target environments before adopting.

Browser support

Feature Desktop Mobile
Chrome
Edge
Firefox
Safari
Chrome Android
Safari iOS
105
105
106
17.4
105
17.4
checkVisibility (options checkOpacity parameter)

`options.checkOpacity` parameter

105
105
106
17.4
105
17.4
checkVisibility (options checkVisibilityCSS parameter)

`options.checkVisibilityCSS` parameter

105
105
106
17.4
105
17.4
checkVisibility (options contentVisibilityAuto parameter)

`options.contentVisibilityAuto` parameter

121
121
122
17.4
121
17.4
checkVisibility (options opacityProperty parameter)

`options.opacityProperty` parameter

121
121
122
17.4
121
17.4
checkVisibility (options visibilityProperty parameter)

`options.visibilityProperty` parameter

121
121
122
17.4
121
17.4
1+Supported (version) Not supported Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)

Syntax

JAVASCRIPT
checkVisibility(options)

Use cases

  • Using checkVisibility()

    The checkVisibility() method of the Element interface checks whether the element is potentially visible.

Cautions

  • May not be supported in older browsers.

Implementation notes

  • Some APIs require a secure context (HTTPS) or user activation. Check the requirements before use.