Element.idl 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #import <CSS/CSSStyleDeclaration.idl>
  2. #import <DOM/ChildNode.idl>
  3. #import <DOM/DOMTokenList.idl>
  4. #import <DOM/InnerHTML.idl>
  5. #import <DOM/NamedNodeMap.idl>
  6. #import <DOM/Node.idl>
  7. #import <DOM/NodeList.idl>
  8. #import <DOM/ParentNode.idl>
  9. #import <Geometry/DOMRect.idl>
  10. #import <Geometry/DOMRectList.idl>
  11. // https://dom.spec.whatwg.org/#element
  12. interface Element : Node {
  13. readonly attribute DOMString? namespaceURI;
  14. readonly attribute DOMString? prefix;
  15. readonly attribute DOMString localName;
  16. readonly attribute DOMString tagName;
  17. DOMString? getAttribute(DOMString qualifiedName);
  18. undefined setAttribute(DOMString qualifiedName, DOMString value);
  19. [CEReactions] undefined setAttributeNS(DOMString? namespace , DOMString qualifiedName , DOMString value);
  20. undefined removeAttribute(DOMString qualifiedName);
  21. [CEReactions] boolean toggleAttribute(DOMString qualifiedName, optional boolean force);
  22. boolean hasAttribute(DOMString qualifiedName);
  23. boolean hasAttributes();
  24. [SameObject] readonly attribute NamedNodeMap attributes;
  25. sequence<DOMString> getAttributeNames();
  26. HTMLCollection getElementsByTagName(DOMString tagName);
  27. HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
  28. HTMLCollection getElementsByClassName(DOMString className);
  29. [Reflect] attribute DOMString id;
  30. [Reflect=class] attribute DOMString className;
  31. [SameObject, PutForwards=value] readonly attribute DOMTokenList classList;
  32. boolean matches(DOMString selectors);
  33. Element? closest(DOMString selectors);
  34. // legacy alias of .matches
  35. [ImplementedAs=matches] boolean webkitMatchesSelector(DOMString selectors);
  36. readonly attribute Element? nextElementSibling;
  37. readonly attribute Element? previousElementSibling;
  38. [ImplementedAs=style_for_bindings] readonly attribute CSSStyleDeclaration style;
  39. DOMRect getBoundingClientRect();
  40. DOMRectList getClientRects();
  41. readonly attribute long clientTop;
  42. readonly attribute long clientLeft;
  43. readonly attribute long clientWidth;
  44. readonly attribute long clientHeight;
  45. };
  46. Element includes ParentNode;
  47. Element includes ChildNode;
  48. Element includes InnerHTML;