Method HTMLElement.hasScrollbars
Detect whether an element has scrollbars.
-
Syntax
Number HTMLElement.hasScrollbars()
Use this method to detect whether an element is clipping its content and displaying scrollbars. -
Return value
This method returns
0 - No scrollbars are present
1 - Horisontal scrollbar is present
2 - Vertical scrollbar is present
3 - Horisontal and vertical scrollbars are both present
- Resources Thanks to Muhammad Shoaib Patel for inspiration for this method.
-
Download
Source
Unless otherwise noted all code in the JSLab Standard Library is licensed as GPLv3. See http://www.gnu.org/licenses/gpl.html for the entire license.
