UNPKG

get-client-window-height

Version:

A safe way of returning the interior height of the window in pixels

16 lines (12 loc) 426 B
var isSupported = function isSupported() { return typeof window !== 'undefined'; }; var getClientWindowHeight = function getClientWindowHeight() { if (!isSupported()) { return 0; } return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; }; export default getClientWindowHeight; export { getClientWindowHeight }; //# sourceMappingURL=get-client-window-height.esm.js.map