Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

isElementSelected.js 729B

1234567891011121314
  1. "use strict";
  2. var __importDefault = (this && this.__importDefault) || function (mod) {
  3. return (mod && mod.__esModule) ? mod : { "default": mod };
  4. };
  5. Object.defineProperty(exports, "__esModule", { value: true });
  6. const getElementProperty_1 = __importDefault(require("./getElementProperty"));
  7. const getElementTagName_1 = __importDefault(require("./getElementTagName"));
  8. async function isElementSelected({ elementId }) {
  9. const tagName = await getElementTagName_1.default.call(this, { elementId });
  10. const name = tagName === 'option' ? 'selected' : 'checked';
  11. const isSelected = await getElementProperty_1.default.call(this, { elementId, name });
  12. return Boolean(isSelected);
  13. }
  14. exports.default = isElementSelected;