Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 451 Bytes

bottomVisible.md

File metadata and controls

18 lines (14 loc) · 451 Bytes
title tags
bottomVisible
browser,intermediate

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