Window.scrollbars

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

Syntax

objRef = window.scrollbars

Example

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

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

Specifications

Specification
HTML Standard
# dom-window-scrollbars-dev

Browser compatibility

BCD tables only load in the browser

See also