Document.idl 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. #import <CSS/StyleSheetList.idl>
  2. #import <DOM/Comment.idl>
  3. #import <DOM/DOMImplementation.idl>
  4. #import <DOM/DocumentFragment.idl>
  5. #import <DOM/DocumentType.idl>
  6. #import <DOM/Element.idl>
  7. #import <DOM/Event.idl>
  8. #import <DOM/EventHandler.idl>
  9. #import <DOM/HTMLCollection.idl>
  10. #import <DOM/Node.idl>
  11. #import <DOM/NodeFilter.idl>
  12. #import <DOM/NodeIterator.idl>
  13. #import <DOM/NodeList.idl>
  14. #import <DOM/Range.idl>
  15. #import <DOM/Text.idl>
  16. #import <DOM/TreeWalker.idl>
  17. #import <HTML/HTMLElement.idl>
  18. #import <HTML/HTMLHeadElement.idl>
  19. #import <HTML/HTMLScriptElement.idl>
  20. interface Document : Node {
  21. constructor();
  22. boolean hasFocus();
  23. // FIXME: These attributes currently don't do anything.
  24. [PutForwards=href, LegacyUnforgeable] readonly attribute Location? location;
  25. readonly attribute DOMImplementation implementation;
  26. [ImplementedAs=url_string] readonly attribute USVString URL;
  27. readonly attribute USVString documentURI;
  28. readonly attribute DOMString characterSet;
  29. readonly attribute DOMString charset;
  30. readonly attribute DOMString inputEncoding;
  31. readonly attribute DOMString contentType;
  32. readonly attribute Window? defaultView;
  33. [CEReactions] Document open(optional DOMString unused1, optional DOMString unused2);
  34. // FIXME: implement ExceptionOr<HTML::Window> Document::open(...)
  35. // WindowProxy? open(USVString url, DOMString name, DOMString features);
  36. [CEReactions] undefined close();
  37. [CEReactions] undefined write(DOMString... text);
  38. [CEReactions] undefined writeln(DOMString... text);
  39. attribute DOMString cookie;
  40. readonly attribute USVString referrer;
  41. readonly attribute Element? activeElement;
  42. Element? getElementById(DOMString id);
  43. HTMLCollection getElementsByName(DOMString name);
  44. HTMLCollection getElementsByTagName(DOMString tagName);
  45. HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
  46. HTMLCollection getElementsByClassName(DOMString className);
  47. readonly attribute HTMLCollection applets;
  48. readonly attribute HTMLCollection anchors;
  49. readonly attribute HTMLCollection images;
  50. readonly attribute HTMLCollection embeds;
  51. readonly attribute HTMLCollection plugins;
  52. readonly attribute HTMLCollection links;
  53. readonly attribute HTMLCollection forms;
  54. readonly attribute HTMLCollection scripts;
  55. Element createElement(DOMString tagName);
  56. Element createElementNS(DOMString? namespace, DOMString qualifiedName);
  57. DocumentFragment createDocumentFragment();
  58. Text createTextNode(DOMString data);
  59. Comment createComment(DOMString data);
  60. Range createRange();
  61. Event createEvent(DOMString interface);
  62. [CEReactions, NewObject] Node importNode(Node node, optional boolean deep = false);
  63. [CEReactions, ImplementedAs=adopt_node_binding] Node adoptNode(Node node);
  64. [ImplementedAs=style_sheets_for_bindings] readonly attribute StyleSheetList styleSheets;
  65. readonly attribute DOMString compatMode;
  66. readonly attribute DocumentType? doctype;
  67. readonly attribute Element? documentElement;
  68. attribute HTMLElement? body;
  69. readonly attribute HTMLHeadElement? head;
  70. readonly attribute HTMLScriptElement? currentScript;
  71. readonly attribute DOMString readyState;
  72. attribute DOMString title;
  73. // FIXME: These should all come from a ParentNode mixin
  74. readonly attribute Element? firstElementChild;
  75. readonly attribute Element? lastElementChild;
  76. readonly attribute unsigned long childElementCount;
  77. [CEReactions, Unscopable] undefined prepend((Node or DOMString)... nodes);
  78. [CEReactions, Unscopable] undefined append((Node or DOMString)... nodes);
  79. [CEReactions, Unscopable] undefined replaceChildren((Node or DOMString)... nodes);
  80. Element? querySelector(DOMString selectors);
  81. [NewObject] NodeList querySelectorAll(DOMString selectors);
  82. [SameObject] readonly attribute HTMLCollection children;
  83. readonly boolean hidden;
  84. readonly DOMString visibilityState;
  85. [NewObject] NodeIterator createNodeIterator(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
  86. [NewObject] TreeWalker createTreeWalker(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
  87. };
  88. HTMLElement includes GlobalEventHandlers;