Returns true if the bottom of the page is visible, false otherwise.
Use scrollY, scrollHeight and clientHeight to determine if the bottom of the page is visible.
代码片段
const bottomVisible = () =>
document.documentElement.clientHeight + window.scrollY >=
(document.documentElement.scrollHeight || document.documentElement.clientHeight);
使用样例
bottomVisible(); // true