nsIDOMCSSRule.idl 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #include "domstubs.idl"
  6. %{C++
  7. namespace mozilla {
  8. namespace css {
  9. class Rule;
  10. }
  11. }
  12. %}
  13. [ptr] native Rule(mozilla::css::Rule);
  14. /**
  15. * The nsIDOMCSSRule interface is a datatype for a CSS style rule in
  16. * the Document Object Model.
  17. *
  18. * For more information on this interface please see
  19. * http://www.w3.org/TR/DOM-Level-2-Style
  20. */
  21. [scriptable, uuid(4d6b3bad-f53c-4585-82f6-62982e27ede8)]
  22. interface nsIDOMCSSRule : nsISupports
  23. {
  24. // RuleType
  25. const unsigned short UNKNOWN_RULE = 0;
  26. const unsigned short STYLE_RULE = 1;
  27. const unsigned short CHARSET_RULE = 2;
  28. const unsigned short IMPORT_RULE = 3;
  29. const unsigned short MEDIA_RULE = 4;
  30. const unsigned short FONT_FACE_RULE = 5;
  31. const unsigned short PAGE_RULE = 6;
  32. const unsigned short KEYFRAMES_RULE = 7;
  33. const unsigned short KEYFRAME_RULE = 8;
  34. // When layout.css.prefixes.animations is disabled/removed,
  35. // we should remove these two MOZ_* constants.
  36. const unsigned short MOZ_KEYFRAMES_RULE = 7;
  37. const unsigned short MOZ_KEYFRAME_RULE = 8;
  38. const unsigned short NAMESPACE_RULE = 10;
  39. const unsigned short COUNTER_STYLE_RULE = 11;
  40. const unsigned short SUPPORTS_RULE = 12;
  41. const unsigned short FONT_FEATURE_VALUES_RULE = 14;
  42. readonly attribute unsigned short type;
  43. attribute DOMString cssText;
  44. // raises(DOMException) on setting
  45. readonly attribute nsIDOMCSSStyleSheet parentStyleSheet;
  46. readonly attribute nsIDOMCSSRule parentRule;
  47. [noscript, nostdcall, notxpcom] Rule getCSSRule();
  48. };