JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html>
<body>
<h1>Heading</h1>
<button onclick="measure()">Measure</button>
<script type="text/javascript">
function measure() {
alert(
"document.body.scrollHeight: " + document.body.scrollHeight +
"\ndocument.documentElement.scrollHeight: " + document.documentElement.scrollHeight +
"\ndocument.documentElement.getBoundingClientRect().height: " + document.documentElement.getBoundingClientRect().height);
}
</script>
</body>
</html>