Quantumbraid's picture
download
raw
365 Bytes
import getWindow from './isWindow';
import offset from './offset';
/**
* Returns the width of a given element.
*
* @param node the element
* @param client whether to use `clientWidth` if possible
*/
export default function getWidth(node, client) {
var win = getWindow(node);
return win ? win.innerWidth : client ? node.clientWidth : offset(node).width;
}

Xet Storage Details

Size:
365 Bytes
·
Xet hash:
e8b98796ea0832a4e0ee7a0b81e4ad4e448c4b96abff215e863ff716385231a0

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.