I am attaching a listener to the orientationchange event:
window.addEventListener(\'orientationchange\', function () { console.log(window.innerHeight); }
Orientation change needs a delay to pick up on the new heights and widths. This works 80% of the time.
window.setTimeout(function() { //insert logic with height or width calulations here. }, 200);