UNPKG

vanillajs-browser-helpers

Version:

Collection of convenience code snippets (helpers) that aims to make it a little easier to work with vanilla JS in the browser

12 lines (10 loc) 264 B
import invisible from './invisible'; /** * Test if a given DOM element is visible. * * @param elm - DOM element to test * @return Is the element visible for the user */ export default function visible(elm: HTMLElement): boolean { return !invisible(elm); }