Element.idl 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. interface Element : Node {
  2. readonly attribute DOMString? namespaceURI;
  3. readonly attribute DOMString? prefix;
  4. readonly attribute DOMString localName;
  5. readonly attribute DOMString tagName;
  6. DOMString? getAttribute(DOMString qualifiedName);
  7. undefined setAttribute(DOMString qualifiedName, DOMString value);
  8. undefined removeAttribute(DOMString qualifiedName);
  9. boolean hasAttribute(DOMString qualifiedName);
  10. boolean hasAttributes();
  11. [SameObject] readonly attribute NamedNodeMap attributes;
  12. sequence<DOMString> getAttributeNames();
  13. HTMLCollection getElementsByTagName(DOMString tagName);
  14. HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
  15. HTMLCollection getElementsByClassName(DOMString className);
  16. // FIXME: This should come from a InnerHTML mixin.
  17. [LegacyNullToEmptyString, CEReactions] attribute DOMString innerHTML;
  18. [Reflect] attribute DOMString id;
  19. [Reflect=class] attribute DOMString className;
  20. [SameObject, PutForwards=value] readonly attribute DOMTokenList classList;
  21. boolean matches(DOMString selectors);
  22. // legacy alias of .matches
  23. [ImplementedAs=matches] boolean webkitMatchesSelector(DOMString selectors);
  24. readonly attribute Element? nextElementSibling;
  25. readonly attribute Element? previousElementSibling;
  26. [ImplementedAs=style_for_bindings] readonly attribute CSSStyleDeclaration style;
  27. // FIXME: These should all come from a ParentNode mixin
  28. readonly attribute Element? firstElementChild;
  29. readonly attribute Element? lastElementChild;
  30. readonly attribute unsigned long childElementCount;
  31. Element? querySelector(DOMString selectors);
  32. [NewObject] NodeList querySelectorAll(DOMString selectors);
  33. [SameObject] readonly attribute HTMLCollection children;
  34. DOMRect getBoundingClientRect();
  35. readonly attribute long clientTop;
  36. readonly attribute long clientLeft;
  37. readonly attribute long clientWidth;
  38. readonly attribute long clientHeight;
  39. // FIXME: This should come from a ChildNode mixin
  40. [CEReactions, Unscopable, ImplementedAs=remove_binding] undefined remove();
  41. };