JSFiddle - React, Tailwind, and code Playground

HTML

<div id="test">test</div>
<div id="hover"></div>

CSS

#test {
    width:4000px;
    height: 2000px;
}
#hover {
    width:200px;
    height:200px;
    background-color:silver;
    position:fixed;
    top:200px;
    left:200px;
}

JavaScript

alert('window width: ' + $(window).width() + '; document width: ' + $(document).width()  + '\n' +
     'window height: ' + $(window).height() + '; document height: ' + $(document).height());