JSFiddle - React, Tailwind, and code Playground
JavaScript
var scrollHeight = Math.max(
document.body.scrollHeight, document.documentElement.scrollHeight,
document.body.offsetHeight, document.documentElement.offsetHeight,
document.body.clientHeight, document.documentElement.clientHeight
);
alert( 'Высота с учетом прокрутки: ' + scrollHeight );