Can't get correct window height

Hey, Anyone know how I can get the height of the page (body)? I have this code:

wixWindow.getBoundingRect()
        .then((windowSizeInfo) => {
let windowHeight = windowSizeInfo.window.height;
let documentHeight = windowSizeInfo.document.height;
            console.log(windowHeight);
            console.log(documentHeight);
        });

But I get the same height for the window and the document although the content of the page is larger than the window size.