版博士V2.0程序
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

HTMLOptGroupElement.js 1.4 KiB

1 год назад
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 HTMLElement_1 = __importDefault(require("../html-element/HTMLElement"));
  7. /**
  8. * HTML Opt Group Element.
  9. *
  10. * Reference:
  11. * https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptGroupElement.
  12. */
  13. class HTMLOptGroupElement extends HTMLElement_1.default {
  14. /**
  15. * Returns label.
  16. *
  17. * @returns Label.
  18. */
  19. get label() {
  20. return this.getAttributeNS(null, 'label') || '';
  21. }
  22. /**
  23. * Sets label.
  24. *
  25. * @param label Label.
  26. */
  27. set label(label) {
  28. if (!label) {
  29. this.removeAttributeNS(null, 'label');
  30. }
  31. else {
  32. this.setAttributeNS(null, 'label', label);
  33. }
  34. }
  35. /**
  36. * Returns disabled.
  37. *
  38. * @returns Disabled.
  39. */
  40. get disabled() {
  41. return this.getAttributeNS(null, 'disabled') !== null;
  42. }
  43. /**
  44. * Sets disabled.
  45. *
  46. * @param disabled Disabled.
  47. */
  48. set disabled(disabled) {
  49. if (!disabled) {
  50. this.removeAttributeNS(null, 'disabled');
  51. }
  52. else {
  53. this.setAttributeNS(null, 'disabled', '');
  54. }
  55. }
  56. }
  57. exports.default = HTMLOptGroupElement;
  58. //# sourceMappingURL=HTMLOptGroupElement.js.map