isVisible.js 241 Bytes Edit Raw Blame History Permalink 1 2 3 4 5 6 7 8 /** * Checks if a given element is currently visible. * * @param node the element to check */ export default function isVisible(node) { return node ? !!(node.offsetWidth || node.offsetHeight || node.getClientRects().length) : false; }