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.

backgroundImage.js 666B

1234567891011121314151617181920212223242526272829303132
  1. 'use strict';
  2. var parsers = require('../parsers');
  3. var parse = function parse(v) {
  4. var parsed = parsers.parseUrl(v);
  5. if (parsed !== undefined) {
  6. return parsed;
  7. }
  8. if (
  9. parsers.valueType(v) === parsers.TYPES.KEYWORD &&
  10. (v.toLowerCase() === 'none' || v.toLowerCase() === 'inherit')
  11. ) {
  12. return v;
  13. }
  14. return undefined;
  15. };
  16. module.exports.isValid = function isValid(v) {
  17. return parse(v) !== undefined;
  18. };
  19. module.exports.definition = {
  20. set: function(v) {
  21. this._setProperty('background-image', parse(v));
  22. },
  23. get: function() {
  24. return this.getPropertyValue('background-image');
  25. },
  26. enumerable: true,
  27. configurable: true,
  28. };