Element : Node Element represents an element in the DOM/document tree. Element is the base type for %%/HTMLElement|HTMLElement%% and %%/SVGElement|SVGElement%%. Spec: https://dom.spec.whatwg.org/#interface-element AlternateSpec: http://dev.w3.org/csswg/cssom-view/#extensions-to-the-element-interface ---- instance.attributes : Array ---- instance.clientTop : Number ReadOnly: true Spec: http://dev.w3.org/csswg/cssom-view/#dom-element-clienttop ---- instance.clientLeft : Number ReadOnly: true Spec: http://dev.w3.org/csswg/cssom-view/#dom-element-clientleft ---- instance.clientWidth : Number ReadOnly: true Spec: http://dev.w3.org/csswg/cssom-view/#dom-element-clientwidth ---- instance.clientHeight : Number ReadOnly: true Spec: http://dev.w3.org/csswg/cssom-view/#dom-element-clientheight ---- instance.dataset : DOMStringMap Map of custom **'data-'** prefixed attributes on **this**. Attribute names are converted to camel case.
ReadOnly: true ---- instance.childElementCount : Number Returns the number of direct children of **this**. ---- instance.children : HTMLCollection The %%/Element|Element%% children in **this**. Unlike %%/Node#childNodes|Node.childNodes%%, **children** only returns nodes inside **this** that derive from %%/Element|Element%% (ie, other node types like %%/Text|Text%% and %%/Comment|Comment%% will be excluded from **children** but present in **childNodes**).
Some text A span
Spec: https://dom.spec.whatwg.org/#dom-parentnode-children ---- instance.className : String Gets or sets the classes of the Element (used for styling via CSS). **className** should be a space separated list of classes. **className** corresponds to the HTML **class** attribute. See also %%#classList|**classList**%%.
Example of the className property.
---- instance.classList : DOMTokenList **classList** is an object that allows easy manipulation of the classes in the %%#className|**className**%% property. See also %%#className|**className**%%.
Example of the classList property.
---- instance.firstElementChild : Element Spec: https://dom.spec.whatwg.org/#dom-parentnode-firstelementchild ---- instance.id : String A unique name for this element in the document. You can retrieve an element by **id** using %%/Document#getElementById|**document.getElementById()**%%. ---- instance.lastElementChild : Element Spec: https://dom.spec.whatwg.org/#dom-parentnode-lastelementchild ---- instance.localName : String ---- instance.namespaceURI : String ---- instance.nextElementSibling : Element ---- instance.prefix : String ---- instance.previousElementSibling : Element ---- instance.shadowRoot : ShadowRoot ReadOnly: true ---- instance.scrollTop : Number Spec: http://dev.w3.org/csswg/cssom-view/#dom-element-scrolltop ---- instance.scrollLeft : Number Spec: http://dev.w3.org/csswg/cssom-view/#dom-element-scrollleft ---- instance.scrollWidth : Number ReadOnly: true Spec: http://dev.w3.org/csswg/cssom-view/#dom-element-scrollwidth ---- instance.scrollHeight : Number ReadOnly: true Spec: http://dev.w3.org/csswg/cssom-view/#dom-element-scrollheight ---- instance.tagName : String ReadOnly: true Spec: http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-104682815 ---- prototype.append(item0 : String, [item1 : String, [...]]) : undefined Same as **%%#append_Node_Node_dotdotdot|append%%(new %%/Text|Text%%(item0), new %%/Text|Text%%(item1), ...)**.
foo
Spec: https://dom.spec.whatwg.org/#dom-parentnode-append ---- prototype.append(item0 : Node, [item1 : Node, [...]]) : undefined Inserts the specified nodes at the end of %%Node#childNodes|**this.childNodes**%%. See also %%#prepend|prepend%%, %%#replaceChildren|replaceChildren%%, and %%Node#appendChild|Node.appendChild%%.
foo
Spec: https://dom.spec.whatwg.org/#dom-parentnode-append ---- prototype.prepend(item0 : String, [item1 : String, [...]]) : undefined Same as **%%#prepend_Node_Node_dotdotdot|prepend%%(new %%/Text|Text%%(item0), new %%/Text|Text%%(item1), ...)**.
foo
Spec: https://dom.spec.whatwg.org/#dom-parentnode-prepend ---- prototype.prepend(item0 : Node, [item1 : Node, [...]]) : undefined Inserts the specified nodes at the start of %%Node#childNodes|**this.childNodes**%%. See also %%#append|append%%, %%#replaceChildren|replaceChildren%%, and %%Node#insertBefore|Node.insertBefore%%.
foo
Spec: https://dom.spec.whatwg.org/#dom-parentnode-prepend ---- prototype.replaceChildren(item0 : String, [item1 : String, [...]]) : undefined Same as **%%#replaceChildren_Node_Node_dotdotdot|replaceChildren%%(new %%/Text|Text%%(item0), new %%/Text|Text%%(item1), ...)**.
foo
Spec: https://dom.spec.whatwg.org/#dom-parentnode-replacechildren ---- prototype.replaceChildren(item0 : Node, [item1 : Node, [...]]) : undefined Removes all items from %%Node#childNodes|**this.childNodes**%% and replaces them with the specified nodes. See also %%#append|append%%, %%#prepend|prepend%%, %%Node#insertBefore|Node.insertBefore%%, %%Node#removeChild|Node.removeChild%%, and %%Node#replaceChild|Node.replaceChild%%.
foo
Spec: https://dom.spec.whatwg.org/#dom-parentnode-replacechildren ---- prototype.createShadowRoot() : ShadowRoot Spec: http://w3c.github.io/webcomponents/spec/shadow/#widl-Element-createShadowRoot-ShadowRoot ---- prototype.getAttribute(name : String) : String ---- prototype.getAttributeNS(namespaceURI : String, localName : String) : String ---- prototype.getDestinationInsertionPoints() : NodeList Spec: http://w3c.github.io/webcomponents/spec/shadow/#widl-Element-getDestinationInsertionPoints-NodeList ---- prototype.getElementsByTagName(name : String) : NodeList Returns a list of descendants of **this** that match the specified tag name. See also %%#getElementsByTagNameNS|**getElementsByTagNameNS()**%%, %%#getElementsByClassName|**getElementsByClassName()**%%, %%#querySelector|**querySelector()**%%, and %%#querySelectorAll|**querySelectorAll()**%%.
Anchor outside foo.
---- prototype.getElementsByTagNameNS(namespaceURI : String, localName : String) : NodeList ---- prototype.getElementsByClassName(classNames : String) : NodeList Returns a list of descendants of **this** that match the specified class name. See also %%#getElementsByTagName|**getElementsByTagName()**%%, %%#querySelector|**querySelector()**%%, and %%#querySelectorAll|**querySelectorAll()**%%.
'bar' outside foo.
---- prototype.hasAttribute(name : String) : Boolean ---- prototype.hasAttributeNS(namespaceURI : String, localName : String) : Boolean ---- prototype.hasAttributes() : Boolean ---- prototype.removeAttribute(name : String) : undefined ---- prototype.removeAttributeNS(namespaceURI : String, localName : String) : undefined ---- prototype.setAttribute(name : String, value : String) : undefined ---- prototype.setAttributeNS(namespaceURI : String, qualifiedName : String, value : String) : undefined ---- prototype.querySelector(selector : String) : Element Returns the first **Element** that matches the CSS **selector**. See also %%#querySelectorAll|**querySelectorAll()**%%, %%#getElementsByTagName|**getElementsByTagName()**%%, and %%#getElementsByClassName|**getElementsByClassName()**%%. foo1 baz1 baz2 Spec: http://www.w3.org/TR/selectors-api/#queryselector ---- prototype.querySelectorAll(cssSelector : String) : NodeList Returns a **NodeList** containing the **Element**s in the document that match the CSS selector. See also %%#querySelector|**querySelector()**%%, %%#getElementsByTagName|**getElementsByTagName()**%%, and %%#getElementsByClassName|**getElementsByClassName()**%%. foo1 baz1 baz2 Spec: http://www.w3.org/TR/selectors-api/#queryselectorall ---- prototype.getClientRects() : ClientRectList Returns a list of rectangles where **this** is in the document. This method is similar to %%#getBoundingClientRect|**getBoundingClientRect()**%% except it will return a %%/ClientRect|ClientRect%% for each part of the element (eg, text elements split on multiple lines will return a list with **length** > 1).
This is a string of wrapping text
Spec: http://dev.w3.org/csswg/cssom-view/#dom-element-getclientrects ---- prototype.getBoundingClientRect() : ClientRect 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|**getClientRects()**%% to get the rectangles of each portion. This is a string of text Spec: http://dev.w3.org/csswg/cssom-view/#dom-element-getboundingclientrect ---- prototype.releasePointerCapture(id : Number) : undefined Spec: http://www.w3.org/TR/pointerevents/#widl-Element-releasePointerCapture-void-long-pointerId ---- prototype.requestFullscreen([options: { \ navigationUI : String /* One of 'auto', 'show', or 'hide'. */ \ }]) : Promise Enters fullscreen mode where **this** fills the entire screen. See also %%/Document#exitFullscreen|**document.exitFullscreen()**%%.
Element
Spec: https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen ---- prototype.requestPointerLock() : undefined Locks the pointer (mouse cursor) to **this**. If successful, %%/Document#onpointerlockchange|document.onpointerlockchange%% will fire and subsequent pointer moves be sent to **this**. If unable to lock the pointer, %%/Document#onpointerlockerror|document.onpointerlockerror%% will fire. Use %%/Document#exitPointerLock|document.exitPointerLock%% to release the pointer. See also %%/Document#pointerLockElement|document.pointerLockElement%%, %%/MouseEvent#movementX|MouseEvent.movementX%% and %%/MouseEvent#movementY|MouseEvent.movementY%%.



Spec:
https://w3c.github.io/pointerlock/#dom-element-requestpointerlock

----
prototype.scrollIntoView([top = false : Boolean]) : undefined

Scolls the element into view.


A
B
C
D
E
F
G
H
Spec: http://dev.w3.org/csswg/cssom-view/#dom-element-scrollintoview ---- prototype.setPointerCapture(id : Number) : undefined Spec: http://www.w3.org/TR/pointerevents/#widl-Element-setPointerCapture-void-long-pointerId ---- event.touchstart : listener(event : TouchEvent) : undefined Called when the user begins touching the element. Bubbles: true Cancelable: true Spec: http://www.w3.org/TR/touch-events/#dfn-touchstart ---- event.touchend : listener(event : TouchEvent) : undefined Called when the user stops touching the element. Bubbles: true Cancelable: true Spec: http://www.w3.org/TR/touch-events/#dfn-touchend ---- event.touchmove : listener(event : TouchEvent) : undefined Called when the user moves while touching the element. Bubbles: true Cancelable: true Spec: http://www.w3.org/TR/touch-events/#dfn-touchmove ---- event.touchcancel : listener(event : TouchEvent) : undefined Bubbles: true Cancelable: false Spec: http://www.w3.org/TR/touch-events/#dfn-touchcancel ---- event.gotpointercapture : listener(event : PointerEvent) : undefined Spec: http://www.w3.org/TR/pointerevents/#widl-Element-ongotpointercapture ---- event.lostpointercapture : listener(event : PointerEvent) : undefined Spec: http://www.w3.org/TR/pointerevents/#widl-Element-onlostpointercapture ---- event.pointerdown : listener(event : PointerEvent) : undefined Spec: http://www.w3.org/TR/pointerevents/#widl-GlobalEventHandlers-onpointerdown ---- event.pointermove : listener(event : PointerEvent) : undefined Spec: http://www.w3.org/TR/pointerevents/#widl-GlobalEventHandlers-onpointermove ---- event.pointerup : listener(event : PointerEvent) : undefined Spec: http://www.w3.org/TR/pointerevents/#widl-GlobalEventHandlers-onpointerup ---- event.pointercancel : listener(event : PointerEvent) : undefined Spec: http://www.w3.org/TR/pointerevents/#widl-GlobalEventHandlers-onpointercancel ---- event.pointerover : listener(event : PointerEvent) : undefined Spec: http://www.w3.org/TR/pointerevents/#widl-GlobalEventHandlers-onpointerover ---- event.pointerout : listener(event : PointerEvent) : undefined Spec: http://www.w3.org/TR/pointerevents/#widl-GlobalEventHandlers-onpointerout ---- event.pointerenter : listener(event : PointerEvent) : undefined Spec: http://www.w3.org/TR/pointerevents/#widl-GlobalEventHandlers-onpointerenter ---- event.pointerleave : listener(event : PointerEvent) : undefined Spec: http://www.w3.org/TR/pointerevents/#widl-GlobalEventHandlers-onpointerleave ---- event.copy : listener(event : ClipboardEvent) : undefined Bubbles: true Cancelable: true Spec: https://w3c.github.io/clipboard-apis/#clipboard-event-copy ---- event.cut : listener(event : ClipboardEvent) : undefined Bubbles: true Cancelable: true Spec: https://w3c.github.io/clipboard-apis/#clipboard-event-cut ---- event.paste : listener(event : ClipboardEvent) : undefined Bubbles: true Cancelable: true Spec: https://w3c.github.io/clipboard-apis/#clipboard-event-paste ---- event.fullscreenchange : listener(event : Event) : undefined Spec: https://fullscreen.spec.whatwg.org/#handler-document-onfullscreenchange ---- event.fullscreenerror : listener(event : Event) : undefined Spec: https://fullscreen.spec.whatwg.org/#handler-document-onfullscreenerror