The Window.scrollbars property returns the scrollbars object, whose visibility can be checked.


objRef = window.scrollbars


The following complete HTML example shows how the visible property of the scrollbars object is used.

<!doctype html>
  <title>Various DOM Tests</title>
    let visibleScrollbars = window.scrollbars.visible;
  <p>Various DOM Tests</p>


Specification Status Comment
HTML Living Standard
The definition of 'Window.scrollbars' in that specification.
Living Standard  
The definition of 'Window.scrollbars' in that specification.

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
scrollbarsChrome Full support YesEdge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes


Full support  
Full support
Compatibility unknown  
Compatibility unknown

See also

Document Tags and Contributors

Last updated by: mdnwebdocs-bot,