src/openseadragon.js
function() {
            var docElement  = document.documentElement || {},
                body        = document.body || {};

            if ( typeof ( window.pageXOffset ) == "number" ) {
                $.getPageScroll = function(){
                    return new $.Point(
                        window.pageXOffset,
                        window.pageYOffset
                    );
                };
            } else if ( body.scrollLeft || body.scrollTop ) {
                $.getPageScroll = function(){
                    return new $.Point(
                        document.body.scrollLeft,
                        document.body.scrollTop
                    );
                };
            } else if ( docElement.scrollLeft || docElement.scrollTop ) {
                $.getPageScroll = function(){
                    return new $.Point(
                        document.documentElement.scrollLeft,
                        document.documentElement.scrollTop
                    );
                };
            } else {
                // We can't reassign the function yet, as there was no scroll.
                return new $.Point(0, 0);
            }

            return $.getPageScroll();
        }
function() {
            var docElement  = document.documentElement || {},
                body        = document.body || {};

            if ( typeof ( window.pageXOffset ) == "number" ) {
                $.getPageScroll = function(){
                    return new $.Point(
                        window.pageXOffset,
                        window.pageYOffset
                    );
                };
            } else if ( body.scrollLeft || body.scrollTop ) {
                $.getPageScroll = function(){
                    return new $.Point(
                        document.body.scrollLeft,
                        document.body.scrollTop
                    );
                };
            } else if ( docElement.scrollLeft || docElement.scrollTop ) {
                $.getPageScroll = function(){
                    return new $.Point(
                        document.documentElement.scrollLeft,
                        document.documentElement.scrollTop
                    );
                };
            } else {
                // We can't reassign the function yet, as there was no scroll.
                return new $.Point(0, 0);
            }

            return $.getPageScroll();
        }
function ( ) { var docElement = document . documentElement || { } , body = document . body || { } ; if ( typeof ( window . pageXOffset ) == "number" ) { $ . getPageScroll = function ( ) { return new $ . Point ( window . pageXOffset , window . pageYOffset ) ; } ; } else if ( body . scrollLeft || body . scrollTop ) { $ . getPageScroll = function ( ) { return new $ . Point ( document . body . scrollLeft , document . body . scrollTop ) ; } ; } else if ( docElement . scrollLeft || docElement . scrollTop ) { $ . getPageScroll = function ( ) { return new $ . Point ( document . documentElement . scrollLeft , document . documentElement . scrollTop ) ; } ; } else { // We can't reassign the function yet, as there was no scroll. return new $ . Point ( 0 , 0 ) ; } return $ . getPageScroll ( ) ; }
Determines the page's current scroll position.
@function
@returns {OpenSeadragon.Point}
Determines the page s current scroll position .