Document nodes are simply
known as documents.
Properties |
Element? | activeElement |
HTMLElement? | - body
- The body attribute, on getting, must return
the body element of the document (either a body element, a
frameset element, or null).
|
DOMString | - characterSet
- The characterSet
attribute must return the name of the
encoding.
|
unsigned long | - childElementCount
- The
childElementCount
attribute must return the number of
children of the
context object that are
elements.
|
HTMLCollection | - children
- The children
attribute must return an HTMLCollection
collection rooted at the
context object matching only
element
children.
|
HTMLCollection | - commands
- The commands attribute of the document's
Document interface must return an HTMLCollection rooted at the
Document node, whose filter matches only elements that define commands and have IDs.
|
DOMString | - compatMode
- The compatMode
attribute must return "BackCompat" if the
context object is in
quirks mode, and
"CSS1Compat" otherwise.
|
DOMString | - contentType
- The contentType
attribute must return the
content type.
|
DOMString | - cookie
- The cookie attribute represents the cookies
of the resource identified by the document's address.
|
DOMElementMap | - cssElementMap
- The cssElementMap IDL attribute
allows authors to define CSS element reference
identifiers, which are used in certain CSS features to override the normal ID-based mapping. [CSSIMAGES]
|
HTMLScriptElement? | - currentScript
- The currentScript attribute, on
getting, must return the value to which it was most recently initialized. When the
Document is created, the currentScript must be initialized to null.
|
WindowProxy? | defaultView |
DOMString | designMode |
DOMString | - dir
- The dir IDL attribute on Document
objects must reflect the dir content attribute of
the html element, if any, limited to only known values. If
there is no such element, then the attribute must return the empty string and do nothing on
setting.
|
DocumentType? | - doctype
- The doctype attribute
must return the child of the
document that is a
doctype, and null otherwise.
|
Element? | - documentElement
- The
documentElement
attribute must return the document element.
|
DOMString | - documentURI
- The URL and
documentURI
attributes must return the URL.
|
DOMString | domain |
HTMLCollection | - embeds
- The embeds attribute must return an
HTMLCollection rooted at the Document node, whose filter matches only
embed elements.
|
Element? | - firstElementChild
- The
firstElementChild
attribute must return the first child
that is an element, and null otherwise.
|
HTMLCollection | - forms
- The forms attribute must return an
HTMLCollection rooted at the Document node, whose filter matches only
form elements.
|
Element (Fullscreen)? | - fullscreenElement
- The fullscreenElement
attribute must return the top
element of the
context object's
fullscreen element stack, or null otherwise.
|
boolean | - fullscreenEnabled
- The
fullscreenEnabled
attribute must return true if the context object and all
ancestor browsing context's
documents have
their fullscreen enabled flag set, or false otherwise.
|
HTMLHeadElement? | - head
- The head attribute, on getting, must return
the head element of the document (a head element or
null).
|
HTMLCollection | - images
- The images attribute must return an
HTMLCollection rooted at the Document node, whose filter matches only
img elements.
|
DOMImplementation | - implementation
- The
implementation
attribute must return the DOMImplementation object that is
associated with the document.
|
Element? | - lastElementChild
- The
lastElementChild
attribute must return the last child
that is an element, and null otherwise.
|
DOMString | lastModified |
DOMString? | - lastStyleSheetSet
- The lastStyleSheetSet attribute must return the last CSS style sheet set name.
|
HTMLCollection | - links
- The links attribute must return an
HTMLCollection rooted at the Document node, whose filter matches only
a elements with href attributes and
area elements with href attributes.
|
Location? | location |
EventHandler | onabort |
EventHandler | onautocomplete |
EventHandler | onautocompleteerror |
EventHandler | onblur |
EventHandler | oncancel |
EventHandler | oncanplay |
EventHandler | oncanplaythrough |
EventHandler | onchange |
EventHandler | onclick |
EventHandler | onclose |
EventHandler | oncuechange |
EventHandler | ondblclick |
EventHandler | ondrag |
EventHandler | ondragend |
EventHandler | ondragenter |
EventHandler | ondragexit |
EventHandler | ondragleave |
EventHandler | ondragover |
EventHandler | ondragstart |
EventHandler | ondrop |
EventHandler | ondurationchange |
EventHandler | onemptied |
EventHandler | onended |
OnErrorEventHandler | onerror |
EventHandler | onfocus |
EventHandler | oninput |
EventHandler | oninvalid |
EventHandler | onkeydown |
EventHandler | onkeypress |
EventHandler | onkeyup |
EventHandler | onload |
EventHandler | onloadeddata |
EventHandler | onloadedmetadata |
EventHandler | onloadstart |
EventHandler | onmousedown |
EventHandler | onmouseenter |
EventHandler | onmouseleave |
EventHandler | onmousemove |
EventHandler | onmouseout |
EventHandler | onmouseover |
EventHandler | onmouseup |
EventHandler | onmousewheel |
EventHandler | onpause |
EventHandler | onplay |
EventHandler | onplaying |
EventHandler? | - onpointerlockchange
- An event handler
for pointerlockchange events.
|
EventHandler? | - onpointerlockerror
- An event handler
for pointerlockerror events.
|
EventHandler | onprogress |
EventHandler | onratechange |
EventHandler | onreadystatechange |
EventHandler | onreset |
EventHandler | onresize |
EventHandler | onscroll |
EventHandler | onseeked |
EventHandler | onseeking |
EventHandler | onselect |
EventHandler | onshow |
EventHandler | onsort |
EventHandler | onstalled |
EventHandler | onsubmit |
EventHandler | onsuspend |
EventHandler | ontimeupdate |
EventHandler | ontoggle |
EventHandler | onvolumechange |
EventHandler | onwaiting |
DOMString | - origin
- The origin
attribute must return the Unicode serialization of
context object's origin. [ORIGIN]
|
HTMLCollection | - plugins
- The plugins attribute must return the
same object as that returned by the embeds
attribute.
|
Element (Pointer Lock)? | - pointerLockElement
- Returns the element set as the target for mouse events
while the pointer is locked. Null if lock is pending, pointer is
unlocked, or if the target is in another document.
|
DOMString? | - preferredStyleSheetSet
- The preferredStyleSheetSet attribute must return the preferred CSS style sheet set
name.
|
DocumentReadyState | - readyState
- The readyState IDL attribute must, on
getting, return the current document readiness.
|
DOMString | - referrer
- The referrer attribute must return
the document's referrer.
|
HTMLCollection | - scripts
- The scripts attribute must return an
HTMLCollection rooted at the Document node, whose filter matches only
script elements.
|
DOMString? | selectedStyleSheetSet |
StyleSheetList | - styleSheets
- The styleSheets attribute must return a StyleSheetList collection representing
the document CSS style sheets.
|
DOMString[] | - styleSheetSets
- The styleSheetSets attribute must return a read only array of the
CSS style sheet set names of the CSS style sheet sets, in order of the
document CSS style sheets. The array is live; if the document CSS style sheets change, the array must be updated as appropriate.
|
DOMString | title |
DOMString | - URL
- The URL and
documentURI
attributes must return the URL.
|
Operations |
Node | adoptNode(Node node) |
void | append((Node or DOMString) nodes...) |
void | close() |
DocumentFragment | - createDocumentFragment()
- The
createDocumentFragment()
method must return a new DocumentFragment
node with its
node document set to the
context object.
|
Element | createElement(DOMString localName) |
Element | createElementNS(DOMString? namespace, DOMString qualifiedName) |
Event | createEvent(DOMString interface) |
NodeIterator | createNodeIterator(Node root, optional unsigned long whatToShow, optional NodeFilter? filter) |
ProcessingInstruction | createProcessingInstruction(DOMString target, DOMString data) |
Range | - createRange()
- The createRange()
method must return a new range with
(context object, 0) as its
start and
end.
|
Text | - createTextNode(DOMString data)
- The
createTextNode(data)
method must return a new Text
node with its
data set to data and
node document set to the
context object.
|
TreeWalker | createTreeWalker(Node root, optional unsigned long whatToShow, optional NodeFilter? filter) |
void | enableStyleSheetsForSet(DOMString? name) |
boolean | execCommand(DOMString commandId, optional boolean showUI, optional DOMString value) |
void | exitFullscreen() |
void | - exitPointerLock()
- Initiates an exit from pointer lock state if currently locked
to a target in this document,
and sends a pointerlockchange event when the lock state
has been exited. The system mouse cursor must be displayed again and positioned at
the same location that it was when pointer lock was entered (the same
location that is reported in screenX/Y
when the pointer is locked).
|
Element? | - getElementById(DOMString elementId)
- The
getElementById(elementId)
method must return the first element, in
tree order, within context object's
descendants, whose
ID is elementId, and null if there is no
such element otherwise.
|
HTMLCollection | - getElementsByClassName(DOMString classNames)
- The
getElementsByClassName(classNames)
method must return the
list of elements with class names classNames
for the context object.
|
NodeList | - getElementsByName(DOMString elementName)
- The getElementsByName(name) method takes a string name, and must
return a live NodeList containing all the HTML elements in
that document that have a name attribute whose value is equal to the name argument (in a case-sensitive manner), in tree
order.
|
HTMLCollection | - getElementsByTagName(DOMString localName)
- The
getElementsByTagName(localName)
method must return the
list of elements with local name localName
for the context object.
|
HTMLCollection | - getElementsByTagNameNS(DOMString? namespace, DOMString localName)
- The
getElementsByTagNameNS(namespace, localName)
method must return the
list of elements with namespace namespace and local name localName
for the context object.
|
NodeList | getItems(optional DOMString typeNames) |
object | getter(DOMString name) |
boolean | hasFocus() |
Node | importNode(Node node, optional boolean deep) |
Document | open(optional DOMString type_url, optional DOMString replace_name, optional DOMString features, optional boolean replace) |
void | prepend((Node or DOMString) nodes...) |
Element? | - query(DOMString relativeSelectors)
- The
query(relativeSelectors)
method must return the first result of running
match a relative selectors string relativeSelectors against
a set consisting of context object, and null if the result is an empty list.
|
Elements | - queryAll(DOMString relativeSelectors)
- The
queryAll(relativeSelectors)
method must return an Elements array initialized with the result of running
match a relative selectors string relativeSelectors against
a set consisting of context object.
|
boolean | queryCommandEnabled(DOMString commandId) |
boolean | queryCommandIndeterm(DOMString commandId) |
boolean | queryCommandState(DOMString commandId) |
boolean | queryCommandSupported(DOMString commandId) |
DOMString | queryCommandValue(DOMString commandId) |
Element? | - querySelector(DOMString selectors)
- The querySelector() methods on the Document, DocumentFragment, and Element interfaces must
return the first matching Element node within the subtrees of the context
node. If there is no matching Element, the method must return null.
|
Element? | - querySelector(DOMString selectors)
- The
querySelector(selectors)
method must return the first result of running scope-match a selectors string
selectors against the context object, and null if the result
is an empty list otherwise.
|
NodeList | - querySelectorAll(DOMString selectors)
- The querySelectorAll() methods on
the Document, DocumentFragment, and Element interfaces must
return a NodeList containing all of
the matching Element nodes within the
subtrees of the context
node, in document order. If there are no
matching nodes, the method must return an empty NodeList.
|
NodeList | - querySelectorAll(DOMString selectors)
- The
querySelectorAll(selectors)
method must return the static result of
running scope-match a selectors string selectors against the
context object.
|
void | write(DOMString text...) |
void | writeln(DOMString text...) |