code: function isTargetElementTotallyScrolled(targetElement) {
      return targetElement ? targetElement.scrollHeight - targetElement.scrollTop <= targetElement.clientHeight : false;
    }
docs: https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#Problems_and_solutions