HTMLBodyElement interface provides special properties (beyond those inherited from the regular
HTMLElement interface) for manipulating
Inherits properties from its parent,
A string that represents the color of active hyperlinks.
A string that represents the description of the location of the background image resource. Note that this is not an URI, though some older version of some browsers do expect it.
A string that represents the background color for the document.
A string that represents the color of unvisited links.
A string that represents the foreground color of text.
A string that represents the color of visited links.
No specific methods; inherits methods from its parent,
HTMLElement events are inherited.
onXYZ event handler properties are also available as aliases targeting the
window object. However, it is advised to listen to them on the
window object directly rather than on
HTMLBodyElement will not work for the
onXYZ event handlers listed below. Listen to the events on the
window object instead.
Fired after the associated document has started printing or the print preview has been closed.
Fired when the associated document is about to be printed or previewed for printing.
Fired when the window, the document and its resources are about to be unloaded.
Fired when the browser detects that a gamepad has been connected or the first time a button/axis of the gamepad is used.
Fired when the browser detects that a gamepad has been disconnected.
Fired when the fragment identifier of the URL has changed (the part of the URL beginning with and following the
Fired when the user's preferred language changes.
Fired when the window receives a message, for example from a call to
Window.postMessage()from another browsing context.
Fired when the window receives a message that can't be deserialized.
Fired when the browser has lost access to the network and the value of
Fired when the browser has gained access to the network and the value of
Fired when the browser hides the current page in the process of presenting a different page from the session's history.
Fired when the browser displays the window's document due to navigation.
Fired when the active history entry changes while the user navigates the session history.
Promiseis rejected and the rejection has been handled.
Fired when a storage area (
localStorage) has been modified in the context of another document.
Fired whenever a
Promiseis rejected but the rejection was not handled.
Fired when the document is being unloaded.
|HTML Standard |
BCD tables only load in the browser
- HTML element implementing this interface: