Element : Node
Instance Properties
The height of this in CSS pixels. Does not include this's border or scrollbar. Will be 0 for display: inline elements; use getBoundingClientRect() or getClientRects() instead. See also HTMLElement.offsetHeight and scrollHeight.
Example:
RunResults:
The width of this in CSS pixels. Does not include this's border or scrollbar. Will be 0 for display: inline elements; use getBoundingClientRect() or getClientRects() instead. See also HTMLElement.offsetWidth and scrollWidth.
Example:
RunResults:
Map of custom 'data-' prefixed attributes on this. Attribute names are converted to camel case.
Example:
RunResults:
A unique name for this element in the document. You can retrieve an element by id using document.getElementById().
The height of the total scrollable region of this in CSS pixels. Will be the same as clientWidth if this does not scroll vertically. See also clientHeight and HTMLElement.offsetHeight.
Example:
RunResults:
The width of the total scrollable region of this in CSS pixels. Will be the same as clientWidth if this does not scroll horizontally. See also clientWidth and HTMLElement.offsetWidth.
Example:
RunResults:
Instance Methods
Inserts the specified nodes at the end of this.childNodes. See also prepend, replaceChildren, and Node.appendChild.
Example:
RunResults:
Returns the rectangular bounds of this relative to the viewport. If this is a text element that is split on multiple lines, the rectangle will be enlarged to contain all portions. Use getClientRects() to get the rectangles of each portion. See also clientWidth and clientHeight.
Example:
RunResults:
Returns a list of rectangles where this is in the document. This method is similar to getBoundingClientRect() except it will return a ClientRect for each part of the element (eg, text elements split on multiple lines will return a list with length > 1). See also clientWidth and clientHeight.
Example:
RunResults:
Returns a list of descendants of this that match the specified class name. See also getElementsByTagName(), querySelector(), and querySelectorAll().
Example:
RunResults:
Returns a list of descendants of this that match the specified tag name. See also getElementsByTagNameNS(), getElementsByClassName(), querySelector(), and querySelectorAll().
Example:
RunResults:
Inserts the specified nodes at the start of this.childNodes. See also append, replaceChildren, and Node.insertBefore.
Example:
RunResults:
Returns the first Element that matches the CSS selector. See also querySelectorAll(), getElementsByTagName(), and getElementsByClassName().
Example:
RunResults:
Returns a NodeList containing the Elements in the document that match the CSS selector. See also querySelector(), getElementsByTagName(), and getElementsByClassName().
Example:
RunResults:
Same as replaceChildren(new Text(item0), new Text(item1), ...).
Example:
RunResults:
Removes all items from this.childNodes and replaces them with the specified nodes. See also append, prepend, Node.insertBefore, Node.removeChild, and Node.replaceChild.
Example:
RunResults:
Enters fullscreen mode where this fills the entire screen. See also document.exitFullscreen().
Example:
RunResults:
Locks the pointer (mouse cursor) to this. If successful, document.onpointerlockchange will fire and subsequent pointer moves be sent to this. If unable to lock the pointer, document.onpointerlockerror will fire. Use document.exitPointerLock to release the pointer. See also document.pointerLockElement, MouseEvent.movementX and MouseEvent.movementY.