ohctechv3/.svn/pristine/ea/eabf8a959e76ff8d68fd651f3375dcfd0c3827be.svn-base
2024-10-28 15:03:36 +05:30

13 lines
368 B
Plaintext

import getWindow from './isWindow';
import offset from './offset';
/**
* Returns the height of a given element.
*
* @param node the element
* @param client whether to use `clientHeight` if possible
*/
export default function height(node, client) {
var win = getWindow(node);
return win ? win.innerHeight : client ? node.clientHeight : offset(node).height;
}