After reading the MDN Article about the window.innerHeight
, I want to use the <html>
elements clientHeight
property in some of my tests, as it is "the height of the window minus its horizontal scroll bar and any borders".
So I need a reference to the <html>
element.
After examining the window object and the document object, the only way to obtain this reference is to query the dom. For example like this: const htmlElement = document.getElementsByTagName("html")[0];
I wonder if there is a better option? Maybe something simple like document.htmlElement
?