MCPcopy Create free account
hub / github.com/Alphanimble/htmlstream / isVerticallyScrollable

Function isVerticallyScrollable

src/hold-stream.ts:166–177  ·  view source on GitHub ↗
(el: HTMLElement)

Source from the content-addressed store, hash-verified

164 "pre, textarea, [data-sh-scroll], .sh-nested-scroll, .sh-thinking-body";
165
166function isVerticallyScrollable(el: HTMLElement): boolean {
167 if (el.scrollHeight <= el.clientHeight + 1) {
168 return false;
169 }
170 const style = getComputedStyle(el);
171 return (
172 style.overflowY === "auto" ||
173 style.overflowY === "scroll" ||
174 style.overflow === "auto" ||
175 style.overflow === "scroll"
176 );
177}
178
179/**
180 * Follow the stream inside capped overflow regions (e.g. `<pre>` code blocks).

Callers 1

syncNestedStreamScrollFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected