Commit 6f3ab007 authored by Julien Cigar's avatar Julien Cigar
Browse files
parents 416ea21c 25b74821
......@@ -428,6 +428,24 @@
}
}
/* Yeti.DOM.getWindowSize
* Returns the size of the browser window.
*/
Yeti.DOM.getWindowSize = function() {
return typeof(window.innerHeight == 'number') ? {
height : window.innerHeight,
width : window.innerWidth
} : document.body && document.body.clientHeight ? {
height : document.body.clientHeight,
width : document.body.clientWidth
} : document.documentElement &&
document.documentElement.clientHeight ? {
height : document.documentElement.clientHeight,
width : document.documentElement.clientWidth
} : undefined;
}
/***********************************************************************
Tools
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment