var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
We didn't test this method but in general we were wondering if this could be a safer approach...
We experienced a case where the height returned by Browser.Events.onResize was 0 instead of the actual height.
The method to get width and height described in https://stackoverflow.com/questions/1248081/get-the-browser-viewport-dimensions-with-javascript seems giving more accurate results:
We didn't test this method but in general we were wondering if this could be a safer approach...