get-client-window-height
Version:
A safe way of returning the interior height of the window in pixels
20 lines (14 loc) • 541 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
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;
};
exports.default = getClientWindowHeight;
exports.getClientWindowHeight = getClientWindowHeight;
//# sourceMappingURL=get-client-window-height.cjs.development.js.map