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

AbstractCSSStyleDeclaration.d.ts 2.2 KiB

1 год назад
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import IElement from '../../nodes/element/IElement';
  2. import CSSRule from '../CSSRule';
  3. import CSSStyleDeclarationElementStyle from './utilities/CSSStyleDeclarationElementStyle';
  4. import CSSStyleDeclarationPropertyManager from './utilities/CSSStyleDeclarationPropertyManager';
  5. /**
  6. * CSS Style Declaration.
  7. */
  8. export default abstract class AbstractCSSStyleDeclaration {
  9. readonly parentRule: CSSRule;
  10. protected _style: CSSStyleDeclarationPropertyManager;
  11. protected _ownerElement: IElement;
  12. protected _computed: boolean;
  13. protected _elementStyle: CSSStyleDeclarationElementStyle;
  14. /**
  15. * Constructor.
  16. *
  17. * @param [ownerElement] Computed style element.
  18. * @param [computed] Computed.
  19. */
  20. constructor(ownerElement?: IElement, computed?: boolean);
  21. /**
  22. * Returns length.
  23. *
  24. * @returns Length.
  25. */
  26. get length(): number;
  27. /**
  28. * Returns the style decleration as a CSS text.
  29. *
  30. * @returns CSS text.
  31. */
  32. get cssText(): string;
  33. /**
  34. * Sets CSS text.
  35. *
  36. * @param cssText CSS text.
  37. */
  38. set cssText(cssText: string);
  39. /**
  40. * Returns item.
  41. *
  42. * @param index Index.
  43. * @returns Item.
  44. */
  45. item(index: number): string;
  46. /**
  47. * Set a property.
  48. *
  49. * @param name Property name.
  50. * @param value Value. Must not contain "!important" as that should be set using the priority parameter.
  51. * @param [priority] Can be "important", or an empty string.
  52. */
  53. setProperty(name: string, value: string, priority?: 'important' | '' | undefined): void;
  54. /**
  55. * Removes a property.
  56. *
  57. * @param name Property name in kebab case.
  58. * @param value Value. Must not contain "!important" as that should be set using the priority parameter.
  59. * @param [priority] Can be "important", or an empty string.
  60. */
  61. removeProperty(name: string): void;
  62. /**
  63. * Returns a property.
  64. *
  65. * @param name Property name in kebab case.
  66. * @returns Property value.
  67. */
  68. getPropertyValue(name: string): string;
  69. /**
  70. * Returns a property.
  71. *
  72. * @param name Property name in kebab case.
  73. * @returns "important" if set to be important.
  74. */
  75. getPropertyPriority(name: string): string;
  76. }