Document.Body
The document.body
element is a reference to the body
object, which represents a <body>
element, or null
if the element does not exist.
The body
property sets or returns the document’s body.
On return, this property returns the <body>
element of the current document.
On set, this property overwrites all child elements inside the existing <body>
element, and replaces it with the new, specified content.
Tip: The difference between the document.body
and the document.documentElement
property, is that the document.body
element returns the <body>
element, while the document.documentElement
returns the <html>
element.
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0
[object HTMLBodyElement]
Interfaces
HTMLBodyElement ← │ ├─── inherits HTMLElement ← │ │ │ ├─── inherits Element ← │ │ │ │ │ ├─── inherits Node ← │ │ │ │ │ │ │ ├─── inherits EventTarget ← │ │ │ │ │ │ │ │ │ ├─── references DOMString ← │ │ │ │ │ │ │ │ │ ├─── references Event ← │ │ │ │ │ │ │ │ │ │ │ ├─── references DOMString ← │ │ │ │ │ │ │ │ │ │ │ ├─── references EventTarget ↑ │ │ │ │ │ │ │ │ │ │ │ └─── references DOMTimeStamp ← │ │ │ │ │ │ │ │ │ └─── references EventListener ← │ │ │ │ │ │ │ │ │ └─── references Event ↑ │ │ │ │ │ │ │ ├─── references Document ← │ │ │ │ │ │ │ │ │ ├─── references Comment ← │ │ │ │ │ │ │ │ │ │ │ └─── inherits CharacterData ← │ │ │ │ │ │ │ │ │ │ │ ├─── inherits Node ↑ │ │ │ │ │ │ │ │ │ │ │ └─── references DOMString ← │ │ │ │ │ │ │ │ │ ├─── references DocumentFragment ← │ │ │ │ │ │ │ │ │ │ │ └─── references Node ↑ │ │ │ │ │ │ │ │ │ ├─── references DocumentType ← │ │ │ │ │ │ │ │ │ │ │ ├─── inherits Node ↑ │ │ │ │ │ │ │ │ │ │ │ └─── references DOMString ← │ │ │ │ │ │ │ │ │ ├─── references DOMImplementation ← │ │ │ │ │ │ │ │ │ │ │ ├─── references Document ↑ │ │ │ │ │ │ │ │ │ │ │ ├─── references DocumentType ↑ │ │ │ │ │ │ │ │ │ │ │ ├─── references DOMString ← │ │ │ │ │ │ │ │ │ │ │ └─── references XMLDocument │ │ │ │ │ │ │ │ │ ├─── references DOMString ← │ │ │ │ │ │ │ │ │ ├─── references Element ↑ │ │ │ │ │ │ │ │ │ ├─── references Event ↑ │ │ │ │ │ │ │ │ │ ├─── references HTMLCollection ← │ │ │ │ │ │ │ │ │ │ │ ├─── references DOMString ← │ │ │ │ │ │ │ │ │ │ │ └─── references Element ↑ │ │ │ │ │ │ │ │ │ ├─── references Node ↑ │ │ │ │ │ │ │ │ │ ├─── references NodeFilter │ │ │ │ │ │ │ │ │ ├─── references NodeIterator │ │ │ │ │ │ │ │ │ ├─── references ProcessingInstruction │ │ │ │ │ │ │ │ │ ├─── references Range │ │ │ │ │ │ │ │ │ ├─── references Text │ │ │ │ │ │ │ │ │ └─── references TreeWalker │ │ │ │ │ │ │ ├─── references DOMString ← │ │ │ │ │ │ │ ├─── references Element ↑ │ │ │ │ │ │ │ ├─── references Node ↑ │ │ │ │ │ │ │ └─── references NodeList ← │ │ │ │ │ │ │ └─── references Node ↑ │ │ │ │ │ ├─── references DOMString ← │ │ │ │ │ ├─── references DOMTokenList │ │ │ │ │ ├─── references HTMLCollection ↑ │ │ │ │ │ └─── references NamedNodeMap ← │ │ │ │ │ ├─── references DOMException ← │ │ │ │ │ ├─── references DOMString ← │ │ │ │ │ └─── references Node ↑ │ │ │ ├─── references DOMString ← │ │ │ └─── implements GlobalEventHandlers ← │ │ │ ├─── references EventHandler ← │ │ │ │ │ ├─── references Event ↑ │ │ │ │ │ └─── references EventHandlerNonNull │ │ │ └─── references OnErrorEventHandler │ └─── implements WindowEventHandlers ← │ ├─── references EventHandler ↑ │ └─── references OnBeforeUnloadEventHandler
CharacterData
(4.9 Interface CharacterData in DOM 4)
[Exposed=Window] interface CharacterData : Node { [TreatNullAs=EmptyString] attribute DOMString data; readonly attribute unsigned long length; DOMString substringData(unsigned long offset, unsigned long count); void appendData (DOMString data); void insertData (unsigned long offset, DOMString data); void deleteData (unsigned long offset, unsigned long count); void replaceData (unsigned long offset, unsigned long count, DOMString data); };
Comment
(4.12 Interface Comment in DOM 4)
[Constructor(optional DOMString data = ""), Exposed=Window] interface Comment : CharacterData { };
Document
The Document
interface is described in section ___ of DOM 1:
interface Document : Node { readonly attribute DocumentType doctype; readonly attribute DOMImplementation implementation; readonly attribute Element documentElement; Element createElement (in DOMString tagName) raises(DOMException); DocumentFragment createDocumentFragment (); Text createTextNode (in DOMString data); Comment createComment (in DOMString data); CDATASection createCDATASection (in DOMString data) raises(DOMException); ProcessingInstruction createProcessingInstruction(in DOMString target, in DOMString data) raises(DOMException); Attr createAttribute (in DOMString name) raises(DOMException); EntityReference createEntityReference (in DOMString name) raises(DOMException); NodeList getElementsByTagName (in DOMString tagname); };
The Document
interface is modified in section 4.5 of DOM 4:
[Constructor, Exposed=Window] interface Document : Node { [SameObject] readonly attribute DOMImplementation implementation; readonly attribute DOMString URL; readonly attribute DOMString documentURI; readonly attribute DOMString origin; readonly attribute DOMString compatMode; readonly attribute DOMString characterSet; readonly attribute DOMString contentType; readonly attribute DocumentType? doctype; readonly attribute Element? documentElement; HTMLCollection getElementsByTagName (DOMString localName); HTMLCollection getElementsByTagNameNS (DOMString? namespace, DOMString localName); HTMLCollection getElementsByClassName (DOMString classNames); [NewObject] Element createElement (DOMString localName); [NewObject] Element createElementNS (DOMString? namespace, DOMString qualifiedName); [NewObject] DocumentFragment createDocumentFragment(); [NewObject] Text createTextNode (DOMString data); [NewObject] Comment createComment (DOMString data); [NewObject] ProcessingInstruction createProcessingInstruction(DOMString target, DOMString data); [NewObject] Node importNode(Node node, optional boolean deep = false); Node adoptNode (Node node); [NewObject] Event createEvent (DOMString interface); [NewObject] Range createRange (); // NodeFilter.SHOW_ALL = 0xFFFFFFFF [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); };
DocumentFragment
(4.6 Interface DocumentFragment in DOM 4)
[Constructor, Exposed=Window] interface DocumentFragment : Node { };
DocumentType
(4.7 Interface DocumentType in DOM 4)
[Exposed=Window] interface DocumentType : Node { readonly attribute DOMString name; readonly attribute DOMString publicId; readonly attribute DOMString systemId; };
DOMException
The DOMException
interface is described in section 1.2. of DOM 1:
exception DOMException { unsigned short code; }; // ExceptionCode const unsigned short INDEX_SIZE_ERR = 1; const unsigned short DOMSTRING_SIZE_ERR = 2; const unsigned short HIERARCHY_REQUEST_ERR = 3; const unsigned short WRONG_DOCUMENT_ERR = 4; const unsigned short INVALID_CHARACTER_ERR = 5; const unsigned short NO_DATA_ALLOWED_ERR = 6; const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7; const unsigned short NOT_FOUND_ERR = 8; const unsigned short NOT_SUPPORTED_ERR = 9; const unsigned short INUSE_ATTRIBUTE_ERR = 10;
DOMImplementation
(section 4.5.1 in DOM 4)
[Exposed=Window] interface DOMImplementation { [NewObject] DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId, DOMString systemId); [NewObject] XMLDocument createDocument (DOMString? namespace, [TreatNullAs=EmptyString] DOMString qualifiedName, optional DocumentType? doctype = null); [NewObject] Document createHTMLDocument (optional DOMString title); boolean hasFeature (); // useless; always returns true };
User agents must create a DOMImplementation
object whenever a document is created and associate it with that document.
DOMString
A DOMString is a sequence of 16-bit quantities.
The DOMString
interface is described in section 1.1.5 of DOM 1:
The DOMString
interface is described in section 3.10.15 of WebIDL 1:
Applications must encode DOMString using UTF-16 (defined in Appendix C.3 of [UNICODE] and Amendment 1 of [ISO-10646]).The UTF-16 encoding was chosen because of its widespread industry practice. Please note that for both HTML and XML, the document character set (and therefore the notation of numeric character references) is based on UCS-4. A single numeric character reference in a source document may therefore in some cases correspond to two array positions in a DOMString (a high surrogate and a low surrogate). Note: Even though the DOM defines the name of the string type to be DOMString, bindings may used different names. For, example for Java, DOMString is bound to the String type because it also uses UTF-16 as its encoding.
wstring
type. However, that definition did not meet the interoperability criteria of the DOM API since it relied on encoding negotiation to decide the width of a character.
The DOMString
interface is described in section 3.10.15 of WebIDL 1:
The DOMString type corresponds to the set of all possible sequences of code units. Such sequences are commonly interpreted as UTF-16 encoded strings [RFC2781] although this is not required. While DOMString is defined to be an OMG IDL boxed sequence
DOMString
. To allow null, a nullable DOMString, written as DOMString? in IDL, needs to be used.
Nothing in this specification requires a DOMString value to be a valid UTF-16 string. For example, a DOMString value might include unmatched surrogate pair characters. However, authors of specifications using Web IDL might want to obtain a sequence of Unicode scalar values given a particular sequence of code units. The following algorithm defines a way to convert a DOMString to a sequence of Unicode scalar values:
- Let S be the DOMString value.
- Let n be the length of S.
- Initialize i to 0.
- Initialize U to be an empty sequence of Unicode characters.
- While i < n:
- Let c be the code unit in S at index i.
- Depending on the value of c:
c < 0xD800 or c > 0xDFFF
Append to U the Unicode character with code point c.
0xDC00 ≤ c ≤ 0xDFFF
Append to U a U+FFFD REPLACEMENT CHARACTER.
0xD800 ≤ c ≤ 0xDBFF- If i = n−1, then append to U a U+FFFD REPLACEMENT CHARACTER.
- Otherwise, i < n−1:
- Let d be the code unit in S at index i+1.
- If 0xDC00 ≤ d ≤ 0xDFFF, then:
- Let a be c & 0x3FF.
- Let b be d & 0x3FF.
- Append to U the Unicode character with code point 216+210a+b.
- Set i to i+1.
- Otherwise, d < 0xDC00 or d > 0xDFFF. Append to U a U+FFFD REPLACEMENT CHARACTER.
- Set i to i+1.
- Return U.
There is no way to represent a constant DOMString value in IDL, although DOMString dictionary member and operation optional argument default values can be specified using a string
literal.
The type name of the DOMString
type is “String”.
DOMTimeStamp
The DOMTimeStamp
interface is described in section 5.3 of WebIDL 1:
typedef unsigned long long DOMTimeStamp;
The DOMTimeStamp
type is used for representing a number of milliseconds, either as an absolute time (relative to some epoch) or as a relative amount of time. Specifications that use this type will need to define how the number of milliseconds is to be interpreted.
DOMTokenList
Element
The Element
interface is described in section ___ of DOM 1:
interface Element : Node { readonly attribute DOMString tagName; DOMString getAttribute (in DOMString name); void setAttribute (in DOMString name, in DOMString value) raises(DOMException); void removeAttribute (in DOMString name) raises(DOMException); Attr getAttributeNode (in DOMString name); Attr setAttributeNode (in Attr newAttr) raises(DOMException); Attr removeAttributeNode (in Attr oldAttr) raises(DOMException); NodeList getElementsByTagName(in DOMString name); void normalize(); };
The Element
interface is described in section 4.8 of DOM 4:
[Exposed=Window] interface Element : Node { readonly attribute DOMString namespaceURI; readonly attribute DOMString prefix; readonly attribute DOMString localName; readonly attribute DOMString tagName; attribute DOMString id; attribute DOMString className; [SameObject] readonly attribute DOMTokenList classList; [SameObject] readonly attribute NamedNodeMap attributes; DOMString getAttribute (DOMString name); DOMString getAttributeNS (DOMString namespace, DOMString localName); void setAttribute (DOMString name, DOMString value); void setAttributeNS (DOMString namespace, DOMString name, DOMString value); void removeAttribute (DOMString name); void removeAttributeNS (DOMString namespace, DOMString localName); boolean hasAttribute (DOMString name); boolean hasAttributeNS (DOMString namespace, DOMString localName); HTMLCollection getElementsByTagName (DOMString localName); HTMLCollection getElementsByTagNameNS(DOMString namespace, DOMString localName); HTMLCollection getElementsByClassName(DOMString classNames); };
Event
EventHandler
(6.1.5.1 Event Handlers in HTML 5)
[TreatNonCallableAsNull] callback EventHandlerNonNull = any (Event event); typedef EventHandlerNonNull? EventHandler;
Function
object implements this interface.
For example, the following document fragment:
…leads to an alert saying “[object Window]” when the document is loaded, and an alert saying “[object HTMLBodyElement]” whenever the user clicks something in the page.
false
, the event is canceled (except for mouseover
events, where the return value has to be true
to cancel the event). With beforeunload
events, the value is instead used to determine the message to show the user.
EventListener
callback interface EventListener { void handleEvent(Event event); };
EventTarget
[Exposed=(Window,Worker)] interface EventTarget { void addEventListener (DOMString type, EventListener? callback, optional boolean capture = false); void removeEventListener(DOMString type, EventListener? callback, optional boolean capture = false); boolean dispatchEvent (Event event); };
GlobalEventHandlers
(6.1.5.2.1 IDL definitions in HTML 5)
[NoInterfaceObject] interface GlobalEventHandlers { attribute EventHandler onabort; attribute EventHandler onblur; attribute EventHandler oncancel; attribute EventHandler oncanplay; attribute EventHandler oncanplaythrough; attribute EventHandler onchange; attribute EventHandler onclick; attribute EventHandler oncuechange; attribute EventHandler ondblclick; attribute EventHandler ondurationchange; attribute EventHandler onemptied; attribute EventHandler onended; attribute OnErrorEventHandler onerror; attribute EventHandler onfocus; attribute EventHandler oninput; attribute EventHandler oninvalid; attribute EventHandler onkeydown; attribute EventHandler onkeypress; attribute EventHandler onkeyup; attribute EventHandler onload; attribute EventHandler onloadeddata; attribute EventHandler onloadedmetadata; attribute EventHandler onloadstart; attribute EventHandler onmousedown; [LenientThis] attribute EventHandler onmouseenter; [LenientThis] attribute EventHandler onmouseleave; attribute EventHandler onmousemove; attribute EventHandler onmouseout; attribute EventHandler onmouseover; attribute EventHandler onmouseup; attribute EventHandler onmousewheel; attribute EventHandler onpause; attribute EventHandler onplay; attribute EventHandler onplaying; attribute EventHandler onprogress; attribute EventHandler onratechange; attribute EventHandler onreset; attribute EventHandler onresize; attribute EventHandler onscroll; attribute EventHandler onseeked; attribute EventHandler onseeking; attribute EventHandler onselect; attribute EventHandler onshow; attribute EventHandler onstalled; attribute EventHandler onsubmit; attribute EventHandler onsuspend; attribute EventHandler ontimeupdate; attribute EventHandler ontoggle; attribute EventHandler onvolumechange; attribute EventHandler onwaiting; };
HTMLBodyElement
The HTMLBodyElement
interface is described in section ___ of DOM 1:
interface HTMLBodyElement : HTMLElement { attribute DOMString aLink; attribute DOMString background; attribute DOMString bgColor; attribute DOMString link; attribute DOMString text; attribute DOMString vLink; };
The HTMLBodyElement
interface is described in section 4.3 of HTML 5:
interface HTMLBodyElement : HTMLElement { }; HTMLBodyElement implements WindowEventHandlers;
Tested in Firefox 47.0.
Hickson, Ian, ed. “HTML5: A vocabulary and associated APIs for HTML and XHTML”. Editor’s Draft. October 25, 2010. <https://www.w3.org/html/wg/spec/sections.html#sections>.
interface HTMLBodyElement : HTMLElement { attribute Function onafterprint; attribute Function onbeforeprint; attribute Function onbeforeunload; attribute Function onblur; attribute Function onerror; attribute Function onfocus; attribute Function onhashchange; attribute Function onload; attribute Function onmessage; attribute Function onoffline; attribute Function ononline; attribute Function onpopstate; attribute Function onpagehide; attribute Function onpageshow; attribute Function onredo; attribute Function onresize; attribute Function onscroll; attribute Function onstorage; attribute Function onundo; attribute Function onunload; };
HTMLCollection
(4.2.6.2 Interface HTMLCollection in DOM 4)
[Exposed=Window] interface HTMLCollection { readonly attribute unsigned long length; getter Element item(unsigned long index); getter Element namedItem(DOMString name); };
HTMLElement
The HTMLElement
interface is described in section ___ of DOM 1:
interface HTMLElement : Element { attribute DOMString id; attribute DOMString title; attribute DOMString lang; attribute DOMString dir; attribute DOMString className; };
NamedNodeMap
The NamedNodeMap
interface is described in section ___ of DOM 1:
interface NamedNodeMap { Node getNamedItem (in DOMString name); Node setNamedItem (in Node arg) raises(DOMException); Node removeNamedItem(in DOMString name) raises(DOMException); Node item (in unsigned long index); readonly attribute unsigned long length; };
Node
The Node
interface is described in section ___ of DOM 1:
interface Node { // NodeType const unsigned short ELEMENT_NODE = 1; const unsigned short ATTRIBUTE_NODE = 2; const unsigned short TEXT_NODE = 3; const unsigned short CDATA_SECTION_NODE = 4; const unsigned short ENTITY_REFERENCE_NODE = 5; const unsigned short ENTITY_NODE = 6; const unsigned short PROCESSING_INSTRUCTION_NODE = 7; const unsigned short COMMENT_NODE = 8; const unsigned short DOCUMENT_NODE = 9; const unsigned short DOCUMENT_TYPE_NODE = 10; const unsigned short DOCUMENT_FRAGMENT_NODE = 11; const unsigned short NOTATION_NODE = 12; readonly attribute DOMString nodeName; attribute DOMString nodeValue; // raises(DOMException) on setting // raises(DOMException) on retrieval readonly attribute unsigned short nodeType; readonly attribute Node parentNode; readonly attribute NodeList childNodes; readonly attribute Node firstChild; readonly attribute Node lastChild; readonly attribute Node previousSibling; readonly attribute Node nextSibling; readonly attribute NamedNodeMap attributes; readonly attribute Document ownerDocument; Node insertBefore (in Node newChild, in Node refChild) raises(DOMException); Node replaceChild (in Node newChild, in Node oldChild) raises(DOMException); Node removeChild (in Node oldChild) raises(DOMException); Node appendChild (in Node newChild) raises(DOMException); boolean hasChildNodes(); Node cloneNode (in boolean deep); };
NodeFilter
NodeIterator
NodeList
The NodeList
interface is described in section ___ of DOM 1:
OnErrorEventHandler
(6.1.5.1 Event Handlers in HTML 5)
[TreatNonCallableAsNull] callback OnErrorEventHandlerNonNull = any ((Event or DOMString) event, optional DOMString source, optional unsigned long lineno, optional unsigned long column, optional any error); typedef OnErrorEventHandlerNonNull? OnErrorEventHandler;
ProcessingInstruction
Range
Text
TreeWalker
WindowEventHandlers
The HTMLBodyElement
interface is described in section 6.1.5.2.1 of HTML 5:
[NoInterfaceObject] interface WindowEventHandlers { attribute EventHandler onafterprint; attribute EventHandler onbeforeprint; attribute OnBeforeUnloadEventHandler onbeforeunload; attribute EventHandler onhashchange; attribute EventHandler onmessage; attribute EventHandler onoffline; attribute EventHandler ononline; attribute EventHandler onpagehide; attribute EventHandler onpageshow; attribute EventHandler onpopstate; attribute EventHandler onstorage; attribute EventHandler onunload; };
Attr
The Attr
interface is described in section ___ of DOM 1:
interface Attr : Node { readonly attribute DOMString name; readonly attribute boolean specified; attribute DOMString value; };
The Attr
interface is modified in section ___ of DOM 2:
interface Attr : Node { readonly attribute DOMString name; readonly attribute boolean specified; attribute DOMString value; // raises(DOMException) on setting // Introduced in DOM Level 2: readonly attribute Element ownerElement; };
The Attr
interface is modified in section ___ of DOM 3:
interface Attr : Node { readonly attribute DOMString name; readonly attribute boolean specified; attribute DOMString value; // raises(DOMException) on setting // Introduced in DOM Level 2: readonly attribute Element ownerElement; // Introduced in DOM Level 3: readonly attribute TypeInfo schemaTypeInfo; // Introduced in DOM Level 3: readonly attribute boolean isId; };
The Attr
interface is modified in section ___ of DOM 4:
[Exposed=Window] interface Attr { readonly attribute DOMString? namespaceURI; readonly attribute DOMString? prefix; readonly attribute DOMString localName; readonly attribute DOMString name; attribute DOMString value; readonly attribute boolean specified; // useless; always returns true };
As of DOM 4 Attr
no longer inherits from Node
and therefore completely changed.
Attributes
document.body.accessKey
Property | Type | Value |
---|---|---|
accessKey | String |
Tested in Edge 13.10586, Firefox 47.0.
document.body.accessKeyLabel
Property | Type | Value |
---|---|---|
accessKeyLabel | String |
Tested in Firefox 47.0.
Undefined in Edge 13.10586.
document.body.aLink
Property | Type | Value |
---|---|---|
aLink | String |
Sets or returns the color of an active link in a document.
Not supported in HTML 5. See CSS :active
selector instead.
Tested in Edge 13.10586, Firefox 47.0.
document.body.background
Property | Type | Value |
---|---|---|
background | String |
Sets or returns the background image for a document.
Not supported in HTML 5. Use style.backgroundImage
instead.
Tested in Edge 13.10586, Firefox 47.0.
document.body.baseURI
Property | Type | Value |
---|---|---|
baseURI | String |
Tested in Edge 13.10586, Firefox 47.0.
document.body.bgColor
Property | Type | Value |
---|---|---|
bgColor | String |
Sets or returns the background color of a document.
Not supported in HTML 5. Use style.backgroundColor
instead.
Tested in Edge 13.10586, Firefox 47.0.
document.body.bgProperties
Property | Type | Value |
---|---|---|
bgProperties | String |
Tested in Edge 13.10586.
Undefined in Firefox 47.0.
document.body.childElementCount
Property | Type | Value |
---|---|---|
childElementCount | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.className
Property | Type | Value |
---|---|---|
className | String |
Tested in Edge 13.10586, Firefox 47.0.
document.body.clientHeight
Property | Type | Value |
---|---|---|
clientHeight | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.clientLeft
Property | Type | Value |
---|---|---|
clientLeft | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.clientTop
Property | Type | Value |
---|---|---|
clientTop | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.clientWidth
Property | Type | Value |
---|---|---|
clientWidth | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.contentEditable
Property | Type | Value |
---|---|---|
contentEditable | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.dir
Property | Type | Value |
---|---|---|
dir | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.draggable
Property | Type | Value |
---|---|---|
draggable | Boolean |
Tested in Edge 13.10586, Firefox 47.0.
document.body.hidden
Property | Type | Value |
---|---|---|
hidden | Boolean |
Tested in Edge 13.10586, Firefox 47.0.
document.body.id
Property | Type | Value |
---|---|---|
id | String |
Tested in Edge 13.10586, Firefox 47.0.
document.body.innerHTML
Property | Type | Value |
---|---|---|
innerHTML | String |
Tested in Edge 13.10586, Firefox 47.0.
document.body.innerText
Property | Type | Value |
---|---|---|
innerText | String |
Tested in Edge 13.10586, Firefox 47.0.
document.body.isContentEditable
Property | Type | Value |
---|---|---|
isContentEditable | Boolean |
Tested in Edge 13.10586, Firefox 47.0.
document.body.itemId
Property | Type | Value |
---|---|---|
itemId | String |
Tested in Firefox 47.0.
Undefined in Edge 13.10586.
document.body.itemScope
Property | Type | Value |
---|---|---|
itemScope | Boolean |
Tested in Firefox 47.0.
Undefined in Edge 13.10586.
document.body.lang
Property | Type | Value |
---|---|---|
lang | String |
Tested in Edge 13.10586, Firefox 47.0.
document.body.link
Property | Type | Value |
---|---|---|
link | String |
Sets or returns the color of unvisited links in a document.
Not supported in HTML 5. See CSS :link
selector instead.
Tested in Edge 13.10586, Firefox 47.0.
document.body.localName
Property | Type | Value |
---|---|---|
localName | String |
Tested in Edge 13.10586, Firefox 47.0.
document.body.namespaceURI
Property | Type | Value |
---|---|---|
namespaceURI | String |
Tested in Edge 13.10586, Firefox 47.0.
document.body.nodeName
Property | Type | Value |
---|---|---|
nodeName | String |
Tested in Edge 13.10586, Firefox 47.0.
document.body.nodeType
Property | Type | Value |
---|---|---|
nodeType | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.offsetHeight
Property | Type | Value |
---|---|---|
offsetHeight | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.offsetLeft
Property | Type | Value |
---|---|---|
offsetLeft | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.offsetTop
Property | Type | Value |
---|---|---|
offsetTop | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.offsetWidth
Property | Type | Value |
---|---|---|
offsetWidth | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.outerHTML
Property | Type | Value |
---|---|---|
outerHTML | String |
Tested in Edge 13.10586, Firefox 47.0.
document.body.scrollHeight
Property | Type | Value |
---|---|---|
scrollHeight | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.scrollLeft
Property | Type | Value |
---|---|---|
scrollLeft | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.scrollLeftMax
Property | Type | Value |
---|---|---|
scrollLeftMax | Number |
Tested in Firefox 47.0.
Undefined in Edge 13.10586.
document.body.scrollTop
Property | Type | Value |
---|---|---|
scrollTop | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.scrollTopMax
Property | Type | Value |
---|---|---|
scrollTopMax | Number |
Tested in Firefox 47.0.
Undefined in Edge 13.10586.
document.body.scrollWidth
Property | Type | Value |
---|---|---|
scrollWidth | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.spellcheck
Property | Type | Value |
---|---|---|
spellcheck | Boolean |
Tested in Edge 13.10586, Firefox 47.0.
document.body.tabIndex
Property | Type | Value |
---|---|---|
tabIndex | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.tagName
Property | Type | Value |
---|---|---|
tagName | String |
Tested in Edge 13.10586, Firefox 47.0.
document.body.text
Property | Type | Value |
---|---|---|
text | String |
Sets or returns the color of the text in a document.
Not supported in HTML 5. Use style.color
instead.
Tested in Edge 13.10586, Firefox 47.0.
document.body.textContent
Property | Type | Value |
---|---|---|
textContent | String |
Tested in Edge 13.10586, Firefox 47.0.
document.body.title
Property | Type | Value |
---|---|---|
title | String |
Tested in Edge 13.10586, Firefox 47.0.
document.body.vLink
Property | Type | Value |
---|---|---|
vLink | String |
Sets or returns the color of visited links in a document.
Not supported in HTML 5. See CSS :visited
selector instead.
Tested in Edge 13.10586, Firefox 47.0.
Methods
document.body.addEventListener()
Property | Type | Value |
---|---|---|
addEventListener() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.appendChild()
Property | Type | Value |
---|---|---|
appendChild() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.blur()
Property | Type | Value |
---|---|---|
blur() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.click()
Property | Type | Value |
---|---|---|
click() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.cloneNode()
Property | Type | Value |
---|---|---|
cloneNode() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.closest()
Property | Type | Value |
---|---|---|
closest() | function |
Tested in Firefox 47.0.
Undefined in Edge 13.10586.
document.body.compareDocumentPosition()
Property | Type | Value |
---|---|---|
compareDocumentPosition() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.contains()
Property | Type | Value |
---|---|---|
contains() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.dispatchEvent()
Property | Type | Value |
---|---|---|
dispatchEvent() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.focus()
Property | Type | Value |
---|---|---|
focus() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.getAttribute()
Property | Type | Value |
---|---|---|
getAttribute() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.getAttributeNames()
Property | Type | Value |
---|---|---|
getAttributeNames() | function |
Tested in Firefox 47.0.
Undefined in Edge 13.10586.
document.body.getAttributeNode()
Property | Type | Value |
---|---|---|
getAttributeNode() | function |
Tested in Edge 13.10586.
document.body.getAttributeNodeNS()
Property | Type | Value |
---|---|---|
getAttributeNodeNS() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.getAttributeNS()
Property | Type | Value |
---|---|---|
getAttributeNS() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.getBoundingClientRect()
Property | Type | Value |
---|---|---|
getBoundingClientRect() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.getClientRects()
Property | Type | Value |
---|---|---|
getClientRects() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.getElementsByClassName()
Property | Type | Value |
---|---|---|
getElementsByClassName() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.getElementsByTagName()
Property | Type | Value |
---|---|---|
getElementsByTagName() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.getElementsByTagNameNS()
Property | Type | Value |
---|---|---|
getElementsByTagNameNS() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.hasAttribute()
Property | Type | Value |
---|---|---|
hasAttribute() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.hasAttributeNS()
Property | Type | Value |
---|---|---|
hasAttributeNS() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.hasAttributes()
Property | Type | Value |
---|---|---|
hasAttributes() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.hasChildNodes()
Property | Type | Value |
---|---|---|
hasChildNodes() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.insertAdjacentHTML()
Property | Type | Value |
---|---|---|
insertAdjacentHTML() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.insertBefore()
Property | Type | Value |
---|---|---|
insertBefore() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.isDefaultNamespace()
Property | Type | Value |
---|---|---|
isDefaultNamespace() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.isEqualNode()
Property | Type | Value |
---|---|---|
isEqualNode() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.lookupNamespaceURI()
Property | Type | Value |
---|---|---|
lookupNamespaceURI() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.lookupPrefix()
Property | Type | Value |
---|---|---|
lookupPrefix() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.matches()
Property | Type | Value |
---|---|---|
matches() | function |
Tested in Firefox 47.0.
Undefined in Edge 13.10586.
document.body.mozMatchesSelector()
Property | Type | Value |
---|---|---|
mozMatchesSelector() | function |
Tested in Firefox 47.0.
document.body.mozRequestFullScreen()
Property | Type | Value |
---|---|---|
mozRequestFullScreen() | function |
Tested in Firefox 47.0.
document.body.mozRequestPointerLock()
Property | Type | Value |
---|---|---|
mozRequestPointerLock() | function |
Tested in Firefox 47.0.
document.body.normalize()
Property | Type | Value |
---|---|---|
normalize() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.querySelector()
Property | Type | Value |
---|---|---|
querySelector() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.querySelectorAll()
Property | Type | Value |
---|---|---|
querySelectorAll() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.releaseCapture()
Property | Type | Value |
---|---|---|
releaseCapture() | function |
Tested in Firefox 47.0.
document.body.remove()
Property | Type | Value |
---|---|---|
remove() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.removeAttribute()
Property | Type | Value |
---|---|---|
removeAttribute() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.removeAttributeNode()
Property | Type | Value |
---|---|---|
removeAttributeNode() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.removeAttributeNS()
Property | Type | Value |
---|---|---|
removeAttributeNS() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.removeChild()
Property | Type | Value |
---|---|---|
removeChild() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.removeEventListener()
Property | Type | Value |
---|---|---|
removeEventListener() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.replaceChild()
Property | Type | Value |
---|---|---|
replaceChild() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.scroll()
Property | Type | Value |
---|---|---|
scroll() | function |
Tested in Firefox 47.0.
document.body.scrollBy()
Property | Type | Value |
---|---|---|
scrollBy() | function |
Tested in Firefox 47.0.
document.body.scrollIntoView()
Property | Type | Value |
---|---|---|
scrollIntoView() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.scrollTo()
Property | Type | Value |
---|---|---|
scrollTo() | function |
Tested in Firefox 47.0.
document.body.setAttribute()
Property | Type | Value |
---|---|---|
setAttribute() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.setAttributeNode()
Property | Type | Value |
---|---|---|
setAttributeNode() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.setAttributeNodeNS()
Property | Type | Value |
---|---|---|
setAttributeNodeNS() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.setAttributeNS()
Property | Type | Value |
---|---|---|
setAttributeNS() | function |
Tested in Edge 13.10586, Firefox 47.0.
document.body.setCapture()
Property | Type | Value |
---|---|---|
setCapture() | function |
Tested in Firefox 47.0.
document.body.webkitMatchesSelector()
Property | Type | Value |
---|---|---|
webkitMatchesSelector() | function |
Tested in Edge 13.10586, Firefox 47.0.
Events
document.body.onabort()
Property | Type | Value |
---|---|---|
onabort() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onafterprint()
Property | Type | Value |
---|---|---|
onafterprint() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onbeforeprint()
Property | Type | Value |
---|---|---|
onbeforeprint() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onbeforeunload()
Property | Type | Value |
---|---|---|
onbeforeunload() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onblur()
Property | Type | Value |
---|---|---|
onblur() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.oncanplay()
Property | Type | Value |
---|---|---|
oncanplay() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.oncanplaythrough()
Property | Type | Value |
---|---|---|
oncanplaythrough() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onchange()
Property | Type | Value |
---|---|---|
onchange() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onclick()
Property | Type | Value |
---|---|---|
onclick() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.oncontextmenu()
Property | Type | Value |
---|---|---|
oncontextmenu() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.oncopy()
Property | Type | Value |
---|---|---|
oncopy() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.oncut()
Property | Type | Value |
---|---|---|
oncut() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.ondblclick()
Property | Type | Value |
---|---|---|
ondblclick() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.ondrag()
Property | Type | Value |
---|---|---|
ondrag() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.ondragend()
Property | Type | Value |
---|---|---|
ondragend() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.ondragenter()
Property | Type | Value |
---|---|---|
ondragenter() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.ondragleave()
Property | Type | Value |
---|---|---|
ondragleave() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.ondragover()
Property | Type | Value |
---|---|---|
ondragover() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.ondragstart()
Property | Type | Value |
---|---|---|
ondragstart() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.ondrop()
Property | Type | Value |
---|---|---|
ondrop() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.ondurationchange()
Property | Type | Value |
---|---|---|
ondurationchange() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onemptied()
Property | Type | Value |
---|---|---|
onemptied() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onended()
Property | Type | Value |
---|---|---|
onended() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onerror()
Property | Type | Value |
---|---|---|
onerror() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onfocus()
Property | Type | Value |
---|---|---|
onfocus() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onhashchange()
Property | Type | Value |
---|---|---|
onhashchange() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.oninput()
Property | Type | Value |
---|---|---|
oninput() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.oninvalid()
Property | Type | Value |
---|---|---|
oninvalid() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onkeydown()
Property | Type | Value |
---|---|---|
onkeydown() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onkeypress()
Property | Type | Value |
---|---|---|
onkeypress() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onkeyup()
Property | Type | Value |
---|---|---|
onkeyup() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onlanguagechange()
Property | Type | Value |
---|---|---|
onlanguagechange() | object |
Tested in Firefox 47.0.
Undefined in Edge 13.10586.
document.body.onload()
Property | Type | Value |
---|---|---|
onload() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onloadeddata()
Property | Type | Value |
---|---|---|
onloadeddata() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onloadedmetadata()
Property | Type | Value |
---|---|---|
onloadedmetadata() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onloadstart()
Property | Type | Value |
---|---|---|
onloadstart() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onmessage()
Property | Type | Value |
---|---|---|
onmessage() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onmousedown()
Property | Type | Value |
---|---|---|
onmousedown() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onmouseenter()
Property | Type | Value |
---|---|---|
onmouseenter() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onmouseleave()
Property | Type | Value |
---|---|---|
onmouseleave() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onmousemove()
Property | Type | Value |
---|---|---|
onmousemove() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onmouseout()
Property | Type | Value |
---|---|---|
onmouseout() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onmouseover()
Property | Type | Value |
---|---|---|
onmouseover() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onmouseup()
Property | Type | Value |
---|---|---|
onmouseup() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onmozfullscreenchange()
Property | Type | Value |
---|---|---|
onmozfullscreenchange() | object |
Tested in Firefox 47.0.
document.body.onmozfullscreenerror()
Property | Type | Value |
---|---|---|
onmozfullscreenerror() | object |
Tested in Firefox 47.0.
document.body.onmozpointerlockchange()
Property | Type | Value |
---|---|---|
onmozpointerlockchange() | object |
Tested in Firefox 47.0.
document.body.onmozpointerlockerror()
Property | Type | Value |
---|---|---|
onmozpointerlockerror() | object |
Tested in Firefox 47.0.
document.body.onoffline()
Property | Type | Value |
---|---|---|
onoffline() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.ononline()
Property | Type | Value |
---|---|---|
ononline() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onpagehide()
Property | Type | Value |
---|---|---|
onpagehide() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onpageshow()
Property | Type | Value |
---|---|---|
onpageshow() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onpaste()
Property | Type | Value |
---|---|---|
onpaste() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onpause()
Property | Type | Value |
---|---|---|
onpause() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onplay()
Property | Type | Value |
---|---|---|
onplay() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onplaying()
Property | Type | Value |
---|---|---|
onplaying() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onpopstate()
Property | Type | Value |
---|---|---|
onpopstate() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onprogress()
Property | Type | Value |
---|---|---|
onprogress() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onratechange()
Property | Type | Value |
---|---|---|
onratechange() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onreset()
Property | Type | Value |
---|---|---|
onreset() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onresize()
Property | Type | Value |
---|---|---|
onresize() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onscroll()
Property | Type | Value |
---|---|---|
onscroll() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onseeked()
Property | Type | Value |
---|---|---|
onseeked() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onseeking()
Property | Type | Value |
---|---|---|
onseeking() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onselect()
Property | Type | Value |
---|---|---|
onselect() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onshow()
Property | Type | Value |
---|---|---|
onshow() | object |
Tested in Firefox 47.0.
Undefined in Edge 13.10586.
document.body.onstalled()
Property | Type | Value |
---|---|---|
onstalled() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onstorage()
Property | Type | Value |
---|---|---|
onstorage() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onsubmit()
Property | Type | Value |
---|---|---|
onsubmit() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onsuspend()
Property | Type | Value |
---|---|---|
onsuspend() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.ontimeupdate()
Property | Type | Value |
---|---|---|
ontimeupdate() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onunload()
Property | Type | Value |
---|---|---|
onunload() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onvolumechange()
Property | Type | Value |
---|---|---|
onvolumechange() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onwaiting()
Property | Type | Value |
---|---|---|
onwaiting() | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.onwheel()
Property | Type | Value |
---|---|---|
onwheel() | object |
Tested in Edge 13.10586, Firefox 47.0.
Objects
document.body.attributes
Property | Type | Value |
---|---|---|
attributes | object NamedNodeMap |
Tested in Edge 13.10586, Firefox 47.0.
document.body.childNodes
Property | Type | Value |
---|---|---|
childNodes | object NodeList |
Tested in Edge 13.10586, Firefox 47.0.
document.body.children
Property | Type | Value |
---|---|---|
children | object HTMLCollection |
Tested in Edge 13.10586, Firefox 47.0.
document.body.classList
Property | Type | Value |
---|---|---|
classList | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.contextMenu
Property | Type | Value |
---|---|---|
contextMenu | object |
Tested in Firefox 47.0.
Undefined in Edge 13.10586.
document.body.dataset
Property | Type | Value |
---|---|---|
dataset | object DOMStringMap |
Tested in Edge 13.10586, Firefox 47.0.
document.body.firstChild
Property | Type | Value |
---|---|---|
firstChild | object Text |
Tested in Edge 13.10586, Firefox 47.0.
document.body.firstElementChild
Property | Type | Value |
---|---|---|
firstElementChild | object HTMLDivElement |
Tested in Edge 13.10586, Firefox 47.0.
document.body.itemProp
Property | Type | Value |
---|---|---|
itemProp | object |
Tested in Firefox 47.0.
Undefined in Edge 13.10586.
document.body.itemRef
Property | Type | Value |
---|---|---|
itemRef | object |
Tested in Firefox 47.0.
Undefined in Edge 13.10586.
document.body.itemType
Property | Type | Value |
---|---|---|
itemType | object |
Tested in Firefox 47.0.
Undefined in Edge 13.10586.
document.body.itemValue
Property | Type | Value |
---|---|---|
itemValue | object |
Tested in Firefox 47.0.
Undefined in Edge 13.10586.
document.body.lastChild
Property | Type | Value |
---|---|---|
lastChild | object HTMLDivElement |
Tested in Edge 13.10586, Firefox 47.0.
document.body.lastElementChild
Property | Type | Value |
---|---|---|
lastElementChild | object HTMLDivElement |
Tested in Edge 13.10586, Firefox 47.0.
document.body.nextElementSibling
Property | Type | Value |
---|---|---|
nextElementSibling | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.nextSibling
Property | Type | Value |
---|---|---|
nextSibling | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.nodeValue
Property | Type | Value |
---|---|---|
nodeValue | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.offsetParent
Property | Type | Value |
---|---|---|
offsetParent | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.ownerDocument
Property | Type | Value |
---|---|---|
ownerDocument | object HTMLDocument |
Tested in Edge 13.10586, Firefox 47.0.
document.body.parentElement
Property | Type | Value |
---|---|---|
parentElement | object HTMLHtmlElement |
Tested in Edge 13.10586, Firefox 47.0.
document.body.parentNode
Property | Type | Value |
---|---|---|
parentNode | object HTMLHtmlElement |
Tested in Edge 13.10586, Firefox 47.0.
document.body.prefix
Property | Type | Value |
---|---|---|
prefix | object |
Tested in Edge 13.10586, Firefox 47.0.
document.body.previousElementSibling
Property | Type | Value |
---|---|---|
previousElementSibling | object HTMLHeadElement |
Tested in Edge 13.10586, Firefox 47.0.
document.body.previousSibling
Property | Type | Value |
---|---|---|
previousSibling | object Text |
Tested in Edge 13.10586, Firefox 47.0.
document.body.properties
Property | Type | Value |
---|---|---|
properties | object HTMLPropertiesCollection |
Tested in Firefox 47.0.
document.body.style
Property | Type | Value |
---|---|---|
style | object CSS2Properties |
Tested in Edge 13.10586, Firefox 47.0.
Constants
document.body.ATTRIBUTE_NODE
Property | Type | Value |
---|---|---|
ATTRIBUTE_NODE | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.CDATA_SECTION_NODE
Property | Type | Value |
---|---|---|
CDATA_SECTION_NODE | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.COMMENT_NODE
Property | Type | Value |
---|---|---|
COMMENT_NODE | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.DOCUMENT_FRAGMENT_NODE
Property | Type | Value |
---|---|---|
DOCUMENT_FRAGMENT_NODE | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.DOCUMENT_NODE
Property | Type | Value |
---|---|---|
DOCUMENT_NODE | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.DOCUMENT_POSITION_CONTAINED_BY
Property | Type | Value |
---|---|---|
DOCUMENT_POSITION_CONTAINED_BY | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.DOCUMENT_POSITION_CONTAINS
Property | Type | Value |
---|---|---|
DOCUMENT_POSITION_CONTAINS | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.DOCUMENT_POSITION_DISCONNECTED
Property | Type | Value |
---|---|---|
DOCUMENT_POSITION_DISCONNECTED | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.DOCUMENT_POSITION_FOLLOWING
Property | Type | Value |
---|---|---|
DOCUMENT_POSITION_FOLLOWING | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
Property | Type | Value |
---|---|---|
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.DOCUMENT_POSITION_PRECEDING
Property | Type | Value |
---|---|---|
DOCUMENT_POSITION_PRECEDING | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.DOCUMENT_TYPE_NODE
Property | Type | Value |
---|---|---|
DOCUMENT_TYPE_NODE | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.DOMSTRING_SIZE_ERR
Property | Type | Value |
---|---|---|
DOMSTRING_SIZE_ERR | const unsigned short |
This exception code indicates the specified range of text does not fit into a DOMString
.
The DOMSTRING_SIZE_ERR
exception code is described in the DOMException interface in section 1.2. of DOM 1.
Undefined in Edge 13.10586, Firefox 47.0.
document.body.ELEMENT_NODE
Property | Type | Value |
---|---|---|
ELEMENT_NODE | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.ENTITY_NODE
Property | Type | Value |
---|---|---|
ENTITY_NODE | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.ENTITY_REFERENCE_NODE
Property | Type | Value |
---|---|---|
ENTITY_REFERENCE_NODE | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.HIERARCHY_REQUEST_ERR
Property | Type | Value |
---|---|---|
HIERARCHY_REQUEST_ERR | const unsigned short |
This exception code indicates if any node is inserted somewhere it doesn’t belong.
The HIERARCHY_REQUEST_ERR
exception code is described in the DOMException interface in section 1.2. of DOM 1.
Undefined in Edge 13.10586, Firefox 47.0.
document.body.INDEX_SIZE_ERR
Property | Type | Value |
---|---|---|
INDEX_SIZE_ERR | const unsigned short |
This exception code indicates index or size is negative, or greater than the allowed value.
The INDEX_SIZE_ERR
exception code is described in the DOMException interface in section 1.2. of DOM 1.
Undefined in Edge 13.10586, Firefox 47.0.
document.body.INUSE_ATTRIBUTE_ERR
Property | Type | Value |
---|---|---|
INUSE_ATTRIBUTE_ERR | const unsigned short |
This exception code indicates an attempt is made to add an attribute that is already in use elsewhere.
The INUSE_ATTRIBUTE_ERR
exception code is described in the DOMException interface in section 1.2. of DOM 1.
Undefined in Edge 13.10586, Firefox 47.0.
document.body.INVALID_CHARACTER_ERR
Property | Type | Value |
---|---|---|
INVALID_CHARACTER_ERR | const unsigned short |
This exception code indicates an invalid character is specified, such as in a name.
The INVALID_CHARACTER_ERR
exception code is described in the DOMException interface in section 1.2. of DOM 1.
Undefined in Edge 13.10586, Firefox 47.0.
document.body.NO_DATA_ALLOWED_ERR
Property | Type | Value |
---|---|---|
NO_DATA_ALLOWED_ERR | const unsigned short |
This exception code indicates data is specified for a node which does not support data.
The NO_DATA_ALLOWED_ERR
exception code is described in the DOMException interface in section 1.2. of DOM 1.
Undefined in Edge 13.10586, Firefox 47.0.
document.body.NO_MODIFICATION_ALLOWED_ERR
Property | Type | Value |
---|---|---|
NO_MODIFICATION_ALLOWED_ERR | const unsigned short |
This exception code indicates an attempt is made to modify an object where modifications are not allowed.
The NO_MODIFICATION_ALLOWED_ERR
exception code is described in the DOMException interface in section 1.2. of DOM 1.
Undefined in Edge 13.10586, Firefox 47.0.
document.body.NOT_FOUND_ERR
Property | Type | Value |
---|---|---|
NOT_FOUND_ERR | const unsigned short |
This exception code indicates an attempt was made to reference a node in a context where it does not exist.
The NOT_FOUND_ERR
exception code is described in the DOMException interface in section 1.2. of DOM 1.
Undefined in Edge 13.10586, Firefox 47.0.
document.body.NOT_SUPPORTED_ERR
Property | Type | Value |
---|---|---|
NOT_SUPPORTED_ERR | const unsigned short |
This exception code indicates the implementation does not support the type of object requested.
The NOT_SUPPORTED_ERR
exception code is described in the DOMException interface in section 1.2. of DOM 1.
Undefined in Edge 13.10586, Firefox 47.0.
document.body.NOTATION_NODE
Property | Type | Value |
---|---|---|
NOTATION_NODE | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.PROCESSING_INSTRUCTION_NODE
Property | Type | Value |
---|---|---|
PROCESSING_INSTRUCTION_NODE | Number |
Tested in Edge 13.10586, Firefox 47.0.
document.body.TEXT_NODE
Property | Type | Value |
---|---|---|
TEXT_NODE | Number |
Tested on Edge 13.10586, Firefox 47.0.
document.body.WRONG_DOCUMENT_ERR
Property | Type | Value |
---|---|---|
WRONG_DOCUMENT_ERR | const unsigned short |
This exception code indicates a node is used in a different document than the one that created it (that doesn’t support it).
The WRONG_DOCUMENT_ERR
exception code is described in the DOMException interface in section 1.2. of DOM 1.
Undefined in Edge 13.10586, Firefox 47.0.
References
DOM 1 Apparao, Vidur, ed. “Document Object Model (DOM) Level 1 Specification, Version 1.0”. W3C Recommendation. World Wide Web Consortium (W3C). October 1, 1998.
DOM 2 Wood, Lauren, ed. “Document Object Model (DOM) Level 2 Specification, Version 1.0”. W3C Candidate Recommendation. World Wide Web Consortium (W3C). May 10, 2000.
DOM 3 Le Hors, Arnaud. “Document Object Model (DOM) Level 3 Core Specification, Version 1.0”. W3C Recommendation. World Wide Web Consortium (W3C). April 7, 2004.
DOM 4 Van Kesteren, Anne, ed. “W3C DOM4”. W3C Proposed Recommendation. World Wide Web Consortium (W3C). October 6, 2015.
HTML 5 Hickson, Ian. “HTML5: A vocabulary and associated APIs for HTML and XHTML”. W3C Recommendation. World Wide Web Consortium (W3C). October 28, 2014.
WebIDL 1 Lafon, Yves, ed. “WebIDL Level 1”. W3C Candidate Recommendation. World Wide Web Consortium (W3C). March 8, 2016.
User Agents (Browsers)
Edge 13.10586 User agent: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586”.
Firefox 47.0 User agent: “Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0”.
SeaMonkey 2.40 User agent: “Mozilla/5.0 (Windows NT 10.0; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40”.