fullscreen.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 Selector = require('../selector');
  6. var Fullscreen = /*#__PURE__*/function (_Selector) {
  7. _inheritsLoose(Fullscreen, _Selector);
  8. function Fullscreen() {
  9. return _Selector.apply(this, arguments) || this;
  10. }
  11. var _proto = Fullscreen.prototype;
  12. /**
  13. * Return different selectors depend on prefix
  14. */
  15. _proto.prefixed = function prefixed(prefix) {
  16. if (prefix === '-webkit-') {
  17. return ':-webkit-full-screen';
  18. }
  19. if (prefix === '-moz-') {
  20. return ':-moz-full-screen';
  21. }
  22. return ":" + prefix + "fullscreen";
  23. };
  24. return Fullscreen;
  25. }(Selector);
  26. _defineProperty(Fullscreen, "names", [':fullscreen']);
  27. module.exports = Fullscreen;