[
Constructor,
ConstructorCallWith=ScriptExecutionContext,
CustomToJSObject,
JSCustomHeader,
JSGenerateToNativeObject,
ExportMacro=WEBCORE_EXPORT,
] interface Document : Node {
readonly attribute DocumentType? doctype;
readonly attribute DOMImplementation implementation;
readonly attribute Element? documentElement;
[NewObject, RaisesException, ImplementedAs=createElementForBindings] Element createElement(DOMString tagName);
[NewObject] DocumentFragment createDocumentFragment();
[NewObject] Text createTextNode(optional DOMString data = "undefined");
[NewObject] Comment createComment(optional DOMString data = "undefined");
[NewObject, RaisesException] CDATASection createCDATASection(optional DOMString data = "undefined");
[ObjCLegacyUnnamedParameters, NewObject, RaisesException] ProcessingInstruction createProcessingInstruction(optional DOMString target = "undefined",
optional DOMString data = "undefined");
[NewObject, RaisesException] Attr createAttribute(optional DOMString name = "undefined");
#