Document.idl 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  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/HTMLCollection.idl>
  9. #import <DOM/Node.idl>
  10. #import <DOM/NodeFilter.idl>
  11. #import <DOM/NodeIterator.idl>
  12. #import <DOM/NodeList.idl>
  13. #import <DOM/Range.idl>
  14. #import <DOM/Text.idl>
  15. #import <DOM/TreeWalker.idl>
  16. #import <HTML/HTMLElement.idl>
  17. #import <HTML/HTMLHeadElement.idl>
  18. #import <HTML/HTMLScriptElement.idl>
  19. interface Document : Node {
  20. constructor();
  21. boolean hasFocus();
  22. // FIXME: These attributes currently don't do anything.
  23. [PutForwards=href, LegacyUnforgeable] readonly attribute Location? location;
  24. readonly attribute DOMImplementation implementation;
  25. readonly attribute DOMString characterSet;
  26. readonly attribute DOMString charset;
  27. readonly attribute DOMString inputEncoding;
  28. readonly attribute DOMString contentType;
  29. readonly attribute Window? defaultView;
  30. [CEReactions] Document open(optional DOMString unused1, optional DOMString unused2);
  31. // FIXME: implement ExceptionOr<HTML::Window> Document::open(...)
  32. // WindowProxy? open(USVString url, DOMString name, DOMString features);
  33. [CEReactions] undefined close();
  34. [CEReactions] undefined write(DOMString... text);
  35. [CEReactions] undefined writeln(DOMString... text);
  36. attribute DOMString cookie;
  37. readonly attribute USVString referrer;
  38. readonly attribute Element? activeElement;
  39. Element? getElementById(DOMString id);
  40. HTMLCollection getElementsByName(DOMString name);
  41. HTMLCollection getElementsByTagName(DOMString tagName);
  42. HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
  43. HTMLCollection getElementsByClassName(DOMString className);
  44. readonly attribute HTMLCollection applets;
  45. readonly attribute HTMLCollection anchors;
  46. readonly attribute HTMLCollection images;
  47. readonly attribute HTMLCollection embeds;
  48. readonly attribute HTMLCollection plugins;
  49. readonly attribute HTMLCollection links;
  50. readonly attribute HTMLCollection forms;
  51. readonly attribute HTMLCollection scripts;
  52. Element createElement(DOMString tagName);
  53. Element createElementNS(DOMString? namespace, DOMString qualifiedName);
  54. DocumentFragment createDocumentFragment();
  55. Text createTextNode(DOMString data);
  56. Comment createComment(DOMString data);
  57. Range createRange();
  58. Event createEvent(DOMString interface);
  59. [CEReactions, NewObject] Node importNode(Node node, optional boolean deep = false);
  60. [CEReactions, ImplementedAs=adopt_node_binding] Node adoptNode(Node node);
  61. [ImplementedAs=style_sheets_for_bindings] readonly attribute StyleSheetList styleSheets;
  62. readonly attribute DOMString compatMode;
  63. readonly attribute DocumentType? doctype;
  64. readonly attribute Element? documentElement;
  65. attribute HTMLElement? body;
  66. readonly attribute HTMLHeadElement? head;
  67. readonly attribute HTMLScriptElement? currentScript;
  68. readonly attribute DOMString readyState;
  69. attribute DOMString title;
  70. // FIXME: These should all come from a ParentNode mixin
  71. readonly attribute Element? firstElementChild;
  72. readonly attribute Element? lastElementChild;
  73. readonly attribute unsigned long childElementCount;
  74. [CEReactions, Unscopable] undefined prepend((Node or DOMString)... nodes);
  75. [CEReactions, Unscopable] undefined append((Node or DOMString)... nodes);
  76. [CEReactions, Unscopable] undefined replaceChildren((Node or DOMString)... nodes);
  77. Element? querySelector(DOMString selectors);
  78. [NewObject] NodeList querySelectorAll(DOMString selectors);
  79. [SameObject] readonly attribute HTMLCollection children;
  80. // FIXME: These should all come from a GlobalEventHandlers mixin
  81. attribute EventHandler onabort;
  82. attribute EventHandler onauxclick;
  83. attribute EventHandler onblur;
  84. attribute EventHandler oncancel;
  85. attribute EventHandler oncanplay;
  86. attribute EventHandler oncanplaythrough;
  87. attribute EventHandler onchange;
  88. attribute EventHandler onclick;
  89. attribute EventHandler onclose;
  90. attribute EventHandler oncontextmenu;
  91. attribute EventHandler oncuechange;
  92. attribute EventHandler ondblclick;
  93. attribute EventHandler ondrag;
  94. attribute EventHandler ondragend;
  95. attribute EventHandler ondragenter;
  96. attribute EventHandler ondragleave;
  97. attribute EventHandler ondragover;
  98. attribute EventHandler ondragstart;
  99. attribute EventHandler ondrop;
  100. attribute EventHandler ondurationchange;
  101. attribute EventHandler onemptied;
  102. attribute EventHandler onended;
  103. // FIXME: Should be an OnErrorEventHandler
  104. attribute EventHandler onerror;
  105. attribute EventHandler onfocus;
  106. attribute EventHandler onformdata;
  107. attribute EventHandler oninput;
  108. attribute EventHandler oninvalid;
  109. attribute EventHandler onkeydown;
  110. attribute EventHandler onkeypress;
  111. attribute EventHandler onkeyup;
  112. attribute EventHandler onload;
  113. attribute EventHandler onloadeddata;
  114. attribute EventHandler onloadedmetadata;
  115. attribute EventHandler onloadstart;
  116. attribute EventHandler onmousedown;
  117. [LegacyLenientThis] attribute EventHandler onmouseenter;
  118. [LegacyLenientThis] attribute EventHandler onmouseleave;
  119. attribute EventHandler onmousemove;
  120. attribute EventHandler onmouseout;
  121. attribute EventHandler onmouseover;
  122. attribute EventHandler onmouseup;
  123. attribute EventHandler onpause;
  124. attribute EventHandler onplay;
  125. attribute EventHandler onplaying;
  126. attribute EventHandler onprogress;
  127. attribute EventHandler onratechange;
  128. attribute EventHandler onreset;
  129. attribute EventHandler onresize;
  130. attribute EventHandler onscroll;
  131. attribute EventHandler onsecuritypolicyviolation;
  132. attribute EventHandler onseeked;
  133. attribute EventHandler onseeking;
  134. attribute EventHandler onselect;
  135. attribute EventHandler onslotchange;
  136. attribute EventHandler onstalled;
  137. attribute EventHandler onsubmit;
  138. attribute EventHandler onsuspend;
  139. attribute EventHandler ontimeupdate;
  140. attribute EventHandler ontoggle;
  141. attribute EventHandler onvolumechange;
  142. attribute EventHandler onwaiting;
  143. attribute EventHandler onwebkitanimationend;
  144. attribute EventHandler onwebkitanimationiteration;
  145. attribute EventHandler onwebkitanimationstart;
  146. attribute EventHandler onwebkittransitionend;
  147. attribute EventHandler onwheel;
  148. readonly boolean hidden;
  149. readonly DOMString visibilityState;
  150. [NewObject] NodeIterator createNodeIterator(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
  151. [NewObject] TreeWalker createTreeWalker(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
  152. };