Calculate status bar height / actual browser height in Android browser using pure javascript?

I need to find the available height for the Android Android browser: screen height is the height of the status bar. I tried:

this.initialHeight = (window.innerHeight < window.innerWidth ? window.innerHeight : window.innerWidth);

Also tried:

this.initialHeight = (window.outerHeight < window.outerWidth ? window.outerHeight : window.outerWidth);

But both of them gave me the same results (360 in landscape mode). How can I find the real available height for a browser with pure javascript?

+4
source share

Source: https://habr.com/ru/post/1676351/


All Articles