I’m using Browser.Dom.getViewport to retrieve the viewport in order to size a map component. However I notice that the height returned for the viewport height is greater than the visible size of the viewport (tested using Responsive Design Mode in Firefox).
However the values returned using javascript match exactly the expected values, using:
function viewport()
{
var e = window
, a = 'inner';
if ( !( 'innerWidth' in window ) )
{
a = 'client';
e = document.documentElement || document.body;
}
return { width : e[ a+'Width' ] , height : e[ a+'Height' ] }
}
console.log(viewport());
Can anyone shed some light on this? Am I mis-interpreting what Viewport means, and if so how can I achieve the equivalent (i.e. measure the visible size of the screen).