function isHidden(element) {
        return (
            element && (
                element.offsetWidth === 0 ||
                element.offsetHeight === 0 ||
                // Also Consider native `<details>` elements.
                element.open === false
            )
        );
    }
Check if a `element` is visible in the DOM

@param  {Element}  element
@return {Boolean}