category | created | title | updated |
---|---|---|---|
DOM |
2021-04-10 |
Check if user scrolls to the bottom of the page |
2021-10-13 |
JavaScript version
const isAtBottom = () =>
document.documentElement.clientHeight + window.scrollY >= document.documentElement.scrollHeight;
TypeScript version
const isAtBottom = (): boolean =>
document.documentElement.clientHeight + window.scrollY >= document.documentElement.scrollHeight;