I am not sure if this is the best way of doing this or if it works in all situations.function atPageEnd() {    var height;    height = window.document.documentElement.scrollHeight;    return window.pageYOffset + window.innerHeight === height;}
Check if page was scrolled all the way to the end
javascript;portability