[
Constructor,
ConstructorCallWith=Document,
CustomToJSObject,
ExportMacro=WEBCORE_EXPORT,
JSCustomHeader,
JSCustomMarkFunction,
JSGenerateToNativeObject,
] interface Document : Node {
readonly attribute DocumentType? doctype;
readonly attribute DOMImplementation implementation;
[DOMJIT=Getter] readonly attribute Element? documentElement;
[NewObject, MayThrowException, ImplementedAs=createElementForBindings] Element createElement(DOMString tagName);
[NewObject] DocumentFragment createDocumentFragment();
[NewObject] Text createTextNode(DOMString data);
[NewObject] Comment createComment(DOMString data);
[NewObject, MayThrowException] CDATASection createCDATASection(DOMString data);
[NewObject, MayThrowException] ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data);
[NewObject, MayThrowException] Attr createAttribute(DOMString name);
HTMLCollection getElementsByTagName(DOMString tagname);
[CEReactions, MayThrowException, NewObject] Node importNode(Node importedNode, optional boolean deep = false);
[NewObject, MayThrowException] Element createElementNS(DOMString? namespaceURI, DOMString qualifiedName);
[NewObject, MayThrowException] Attr createAttributeNS(DOMString? namespaceURI, DOMString qualifiedName);
HTMLCollection getElementsByTagNameNS(DOMString? namespaceURI, DOMString localName);
[ImplementedAs=characterSetWithUTF8Fallback] readonly attribute DOMString inputEncoding;
readonly attribute DOMString? xmlEncoding;
[SetterMayThrowException] attribute DOMString? xmlVersion;
attribute boolean xmlStandalone;
[CEReactions, MayThrowException] Node adoptNode(Node source);
[ImplementedAs=urlForBindings] readonly attribute USVString documentURI;
[MayThrowException, NewObject] Event createEvent(DOMString eventType);
[NewObject] Range createRange();
[NewObject] NodeIterator createNodeIterator(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
[NewObject] TreeWalker createTreeWalker(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
readonly attribute DOMWindow defaultView;
readonly attribute StyleSheetList styleSheets;
CSSStyleDeclaration getOverrideStyle(optional Element? element = null, optional DOMString pseudoElement = "undefined");
readonly attribute DOMString contentType;
[MayThrowException] XPathExpression createExpression(optional DOMString expression = "undefined", optional XPathNSResolver? resolver);
XPathNSResolver createNSResolver(Node? nodeResolver);
[MayThrowException] XPathResult evaluate(optional DOMString expression = "undefined", optional Node? contextNode, optional XPathNSResolver? resolver, optional unsigned short type = 0, optional XPathResult? inResult);
[CEReactions] boolean execCommand(DOMString command, optional boolean userInterface = false, optional DOMString? value = null);
boolean queryCommandEnabled(DOMString command);
boolean queryCommandIndeterm(DOMString command);
boolean queryCommandState(DOMString command);
boolean queryCommandSupported(DOMString command);
DOMString queryCommandValue(DOMString command);
[CEReactions] attribute DOMString title;
attribute DOMString dir;
attribute DOMString designMode;
readonly attribute USVString referrer;
[SetterMayThrowException] attribute USVString domain;
[ImplementedAs=urlForBindings] readonly attribute USVString URL;
[GetterMayThrowException, SetterMayThrowException] attribute USVString cookie;
[CEReactions, DOMJIT=Getter, ImplementedAs=bodyOrFrameset, SetterMayThrowException] attribute HTMLElement? body;
readonly attribute HTMLHeadElement? head;
readonly attribute HTMLCollection images;
readonly attribute HTMLCollection applets;
readonly attribute HTMLCollection links;
readonly attribute HTMLCollection forms;
readonly attribute HTMLCollection anchors;
readonly attribute HTMLCollection embeds;
readonly attribute HTMLCollection plugins;
readonly attribute HTMLCollection scripts;
readonly attribute DOMString lastModified;
NodeList getElementsByName([AtomicString] DOMString elementName);
[PutForwards=href, Unforgeable] readonly attribute Location? location;
[ImplementedAs=characterSetWithUTF8Fallback] readonly attribute DOMString charset;
readonly attribute DOMString readyState;
Range caretRangeFromPoint(optional long x = 0, optional long y = 0);
DOMSelection getSelection();
[ImplementedAs=characterSetWithUTF8Fallback] readonly attribute DOMString characterSet;
readonly attribute DOMString? preferredStylesheetSet;
attribute DOMString? selectedStylesheetSet;
[Custom] (CanvasRenderingContext2D or WebGLRenderingContextBase) getCSSCanvasContext(DOMString contextId, DOMString name, long width, long height);
HTMLCollection getElementsByClassName(DOMString classNames);
boolean hasFocus();
readonly attribute DOMString compatMode;
#