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.

react$$.js 949B

123456789101112131415161718
  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 fs_1 = __importDefault(require("fs"));
  7. const utils_1 = require("../../utils");
  8. const getElementObject_1 = require("../../utils/getElementObject");
  9. const resq_1 = require("../../scripts/resq");
  10. const resqScript = fs_1.default.readFileSync(require.resolve('resq'));
  11. async function react$$(selector, { props = {}, state = {} } = {}) {
  12. await this.executeScript(resqScript.toString(), []);
  13. await this.execute(resq_1.waitToLoadReact);
  14. const res = await this.execute(resq_1.react$$, selector, props, state);
  15. const elements = await getElementObject_1.getElements.call(this, selector, res, true);
  16. return utils_1.enhanceElementsArray(elements, this, selector, 'react$$', [props, state]);
  17. }
  18. exports.default = react$$;