user-select.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. "use strict";
  2. function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
  3. function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
  4. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  5. var Declaration = require('../declaration');
  6. var UserSelect = /*#__PURE__*/function (_Declaration) {
  7. _inheritsLoose(UserSelect, _Declaration);
  8. function UserSelect() {
  9. return _Declaration.apply(this, arguments) || this;
  10. }
  11. var _proto = UserSelect.prototype;
  12. /**
  13. * Change prefixed value for IE
  14. */
  15. _proto.set = function set(decl, prefix) {
  16. if (prefix === '-ms-' && decl.value === 'contain') {
  17. decl.value = 'element';
  18. }
  19. return _Declaration.prototype.set.call(this, decl, prefix);
  20. };
  21. return UserSelect;
  22. }(Declaration);
  23. _defineProperty(UserSelect, "names", ['user-select']);
  24. module.exports = UserSelect;