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.

shadowFnFactory.js 557B

123456789101112131415
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.shadowFnFactory = void 0;
  4. exports.shadowFnFactory = function (elementSelector, qsAll = false) {
  5. const strFn = `
  6. (function() {
  7. // element has a shadowRoot property
  8. if (this.shadowRoot) {
  9. return this.shadowRoot.querySelector${qsAll ? 'All' : ''}('${elementSelector}')
  10. }
  11. // fall back to querying the element directly if not
  12. return this.querySelector${qsAll ? 'All' : ''}('${elementSelector}')
  13. })`;
  14. return eval(strFn);
  15. };