[
Constructor,
ConstructorCallWith=ScriptExecutionContext,
CustomToJSObject,
JSGenerateToNativeObject,
] interface Document : Node {
readonly attribute DocumentType doctype;
readonly attribute DOMImplementation implementation;
readonly attribute Element documentElement;
[ReturnNewObject, RaisesException] Element createElement([TreatNullAs=NullString,Default=Undefined] optional DOMString tagName);
DocumentFragment createDocumentFragment();
[ReturnNewObject] Text createTextNode([Default=Undefined] optional DOMString data);
[ReturnNewObject] Comment createComment([Default=Undefined] optional DOMString data);
[ReturnNewObject, RaisesException] CDATASection createCDATASection([Default=Undefined] optional DOMString data);
[ObjCLegacyUnnamedParameters, ReturnNewObject, RaisesException] ProcessingInstruction createProcessingInstruction([Default=Undefined] optional DOMString target,
[Default=Undefined] optional DOMString data);
[ReturnNewObject, RaisesException] Attr createAttribute([Default=Undefined] optional DOMString name);
[ReturnNewObject, RaisesException] EntityReference createEntityReference([Default=Undefined] optional DOMString name);
NodeList getElementsByTagName([Default=Undefined] optional DOMString tagname);
[ObjCLegacyUnnamedParameters, ReturnNewObject, RaisesException] Node importNode([Default=Undefined] optional Node importedNode,
optional boolean deep);
[ObjCLegacyUnnamedParameters, ReturnNewObject, RaisesException] Element createElementNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,
[TreatNullAs=NullString,Default=Undefined] optional DOMString qualifiedName);
[ObjCLegacyUnnamedParameters, ReturnNewObject, RaisesException] Attr createAttributeNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,
[TreatNullAs=NullString,Default=Undefined] optional DOMString qualifiedName);
[ObjCLegacyUnnamedParameters] NodeList getElementsByTagNameNS([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI,
[Default=Undefined] optional DOMString localName);
Element getElementById([Default=Undefined,ObjCExplicitAtomicString,RequiresExistingAtomicString] optional DOMString elementId);
[TreatReturnedNullStringAs=Null] readonly attribute DOMString inputEncoding;
[TreatReturnedNullStringAs=Null] readonly attribute DOMString xmlEncoding;
[TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException] attribute DOMString xmlVersion;
[SetterRaisesException] attribute boolean xmlStandalone;
[RaisesException] Node adoptNode([Default=Undefined] optional Node source);
#