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

17 lines (16 loc) 503 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var invisible_1 = __importDefault(require("./invisible")); /** * Test if a given DOM element is visible. * * @param elm - DOM element to test * @return Is the element visible for the user */ function visible(elm) { return !invisible_1.default(elm); } exports.default = visible;