seamless-streaming / streaming-react-app /src /isScrolledToDocumentBottom.ts
Anna Sun
Initial OSS demo commit
2bd3674
raw
history blame
226 Bytes
export default function isScrolledToDocumentBottom(
bufferPx: number = 0,
): boolean {
if (
window.innerHeight + window.scrollY >=
document.body.offsetHeight - bufferPx
) {
return true;
}
return false;
}