MCPcopy Index your code
hub / github.com/DeepNotesApp/DeepNotes / hasVertScrollbar

Function hasVertScrollbar

packages/@stdlib/misc/src/dom.ts:3–11  ·  view source on GitHub ↗
(elem: HTMLElement)

Source from the content-addressed store, hash-verified

1import { Vec2 } from './vec2';
2
3export function hasVertScrollbar(elem: HTMLElement) {
4 const computedStyle = window.getComputedStyle(elem);
5
6 return (
7 computedStyle.overflowY === 'scroll' ||
8 (computedStyle.overflowY === 'auto' &&
9 elem.scrollHeight > (elem.clientHeight || elem.offsetHeight))
10 );
11}
12export function hasHorizScrollbar(elem: HTMLElement) {
13 const computedStyle = window.getComputedStyle(elem);
14

Callers 5

performMethod · 0.90
scrollIntoViewMethod · 0.90
hasScrollbarFunction · 0.85
isTouchOverScrollbarFunction · 0.85
isMouseOverScrollbarFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected