interface Document : Node {

    readonly attribute DOMImplementation implementation;

    readonly attribute DOMString characterSet;
    readonly attribute DOMString charset;
    readonly attribute DOMString inputEncoding;
    readonly attribute DOMString contentType;

    Element? getElementById(DOMString id);
    Element? querySelector(DOMString selectors);
    ArrayFromVector getElementsByTagName(DOMString tagName);
    ArrayFromVector querySelectorAll(DOMString selectors);

    Element createElement(DOMString tagName);
    DocumentFragment createDocumentFragment();
    Text createTextNode(DOMString data);
    Comment createComment(DOMString data);

    readonly attribute DOMString compatMode;
    readonly attribute DocumentType? doctype;

    readonly attribute Element? documentElement;
    attribute HTMLElement? body;
    readonly attribute HTMLHeadElement? head;

    readonly attribute DOMString readyState;

}
