UNPKG

@augment-vir/web

Version:

A collection of augments, helpers types, functions, and classes only for web (frontend) JavaScript environments.

12 lines (11 loc) 383 B
/** * Detects `display: none` and only works if the element does not have `position: fixed;`. * * @category Web : Elements * @category Package : @augment-vir/web * @package [`@augment-vir/web`](https://www.npmjs.com/package/@augment-vir/web) */ export function isElementVisible(element) { // https://stackoverflow.com/a/21696585 return element.offsetParent !== null; }