Search code examples
javascriptandroidwebkit

Alternatives to window.scrollMaxY?


I' trying to use window.pageYOffset & window.scrollMaxY to calculate the current page progress. This approach works under FF3.5 but under webkit window.scrollMaxY is undefined.


Solution

  • I've got away with document.body.scrollHeight so that

    document.body.scrollHeight = window.pageYOffset + screen height in pixels
    

    at the end of the page (on Android).