Interface: Element
Element is the most general base class from which all objects in a Document inherit. It only has methods and properties common to all kinds of elements. More specific classes inherit from Element.
Extends
Node.ARIAMixin.Animatable.ChildNode.NonDocumentTypeChildNode.ParentNode.Slottable
Properties
__evolv__
__evolv__:
MutateContext
ariaAtomic
ariaAtomic:
null|string
Inherited from
ARIAMixin.ariaAtomic
ariaAutoComplete
ariaAutoComplete:
null|string
Inherited from
ARIAMixin.ariaAutoComplete
ariaBrailleLabel
ariaBrailleLabel:
null|string
Inherited from
ARIAMixin.ariaBrailleLabel
ariaBrailleRoleDescription
ariaBrailleRoleDescription:
null|string
Inherited from
ARIAMixin.ariaBrailleRoleDescription
ariaBusy
ariaBusy:
null|string
Inherited from
ARIAMixin.ariaBusy
ariaChecked
ariaChecked:
null|string
Inherited from
ARIAMixin.ariaChecked
ariaColCount
ariaColCount:
null|string
Inherited from
ARIAMixin.ariaColCount
ariaColIndex
ariaColIndex:
null|string
Inherited from
ARIAMixin.ariaColIndex
ariaColSpan
ariaColSpan:
null|string
Inherited from
ARIAMixin.ariaColSpan
ariaCurrent
ariaCurrent:
null|string
Inherited from
ARIAMixin.ariaCurrent
ariaDescription
ariaDescription:
null|string
Inherited from
ARIAMixin.ariaDescription
ariaDisabled
ariaDisabled:
null|string
Inherited from
ARIAMixin.ariaDisabled
ariaExpanded
ariaExpanded:
null|string
Inherited from
ARIAMixin.ariaExpanded
ariaHasPopup
ariaHasPopup:
null|string
Inherited from
ARIAMixin.ariaHasPopup
ariaHidden
ariaHidden:
null|string
Inherited from
ARIAMixin.ariaHidden
ariaInvalid
ariaInvalid:
null|string
Inherited from
ARIAMixin.ariaInvalid
ariaKeyShortcuts
ariaKeyShortcuts:
null|string
Inherited from
ARIAMixin.ariaKeyShortcuts
ariaLabel
ariaLabel:
null|string
Inherited from
ARIAMixin.ariaLabel
ariaLevel
ariaLevel:
null|string
Inherited from
ARIAMixin.ariaLevel
ariaLive
ariaLive:
null|string
Inherited from
ARIAMixin.ariaLive
ariaModal
ariaModal:
null|string
Inherited from
ARIAMixin.ariaModal
ariaMultiLine
ariaMultiLine:
null|string
Inherited from
ARIAMixin.ariaMultiLine
ariaMultiSelectable
ariaMultiSelectable:
null|string
Inherited from
ARIAMixin.ariaMultiSelectable
ariaOrientation
ariaOrientation:
null|string
Inherited from
ARIAMixin.ariaOrientation
ariaPlaceholder
ariaPlaceholder:
null|string
Inherited from
ARIAMixin.ariaPlaceholder
ariaPosInSet
ariaPosInSet:
null|string
Inherited from
ARIAMixin.ariaPosInSet
ariaPressed
ariaPressed:
null|string
Inherited from
ARIAMixin.ariaPressed
ariaReadOnly
ariaReadOnly:
null|string
Inherited from
ARIAMixin.ariaReadOnly
ariaRequired
ariaRequired:
null|string
Inherited from
ARIAMixin.ariaRequired
ariaRoleDescription
ariaRoleDescription:
null|string
Inherited from
ARIAMixin.ariaRoleDescription
ariaRowCount
ariaRowCount:
null|string
Inherited from
ARIAMixin.ariaRowCount
ariaRowIndex
ariaRowIndex:
null|string
Inherited from
ARIAMixin.ariaRowIndex
ariaRowSpan
ariaRowSpan:
null|string
Inherited from
ARIAMixin.ariaRowSpan
ariaSelected
ariaSelected:
null|string
Inherited from
ARIAMixin.ariaSelected
ariaSetSize
ariaSetSize:
null|string
Inherited from
ARIAMixin.ariaSetSize
ariaSort
ariaSort:
null|string
Inherited from
ARIAMixin.ariaSort
ariaValueMax
ariaValueMax:
null|string
Inherited from
ARIAMixin.ariaValueMax
ariaValueMin
ariaValueMin:
null|string
Inherited from
ARIAMixin.ariaValueMin
ariaValueNow
ariaValueNow:
null|string
Inherited from
ARIAMixin.ariaValueNow
ariaValueText
ariaValueText:
null|string
Inherited from
ARIAMixin.ariaValueText
assignedSlot
readonlyassignedSlot:null|HTMLSlotElement
Inherited from
Slottable.assignedSlot
ATTRIBUTE_NODE
readonlyATTRIBUTE_NODE:2
Inherited from
Node.ATTRIBUTE_NODE
attributes
readonlyattributes:NamedNodeMap
baseURI
readonlybaseURI:string
Returns node's node document's document base URL.
Inherited from
Node.baseURI
CDATA_SECTION_NODE
readonlyCDATA_SECTION_NODE:4
node is a CDATASection node.
Inherited from
Node.CDATA_SECTION_NODE
childElementCount
readonlychildElementCount:number
Inherited from
ParentNode.childElementCount
childNodes
readonlychildNodes:NodeListOf<ChildNode>
Returns the children.
Inherited from
Node.childNodes
children
readonlychildren:HTMLCollection
Returns the child elements.
Inherited from
ParentNode.children
classList
readonlyclassList:DOMTokenList
Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object.
className
className:
string
Returns the value of element's class content attribute. Can be set to change it.
clientHeight
readonlyclientHeight:number
clientLeft
readonlyclientLeft:number
clientTop
readonlyclientTop:number
clientWidth
readonlyclientWidth:number
COMMENT_NODE
readonlyCOMMENT_NODE:8
node is a Comment node.
Inherited from
Node.COMMENT_NODE
dataset
dataset:
DOMStringMap
DOCUMENT_FRAGMENT_NODE
readonlyDOCUMENT_FRAGMENT_NODE:11
node is a DocumentFragment node.
Inherited from
Node.DOCUMENT_FRAGMENT_NODE
DOCUMENT_NODE
readonlyDOCUMENT_NODE:9
node is a document.
Inherited from
Node.DOCUMENT_NODE
DOCUMENT_POSITION_CONTAINED_BY
readonlyDOCUMENT_POSITION_CONTAINED_BY:16
Set when other is a descendant of node.
Inherited from
Node.DOCUMENT_POSITION_CONTAINED_BY
DOCUMENT_POSITION_CONTAINS
readonlyDOCUMENT_POSITION_CONTAINS:8
Set when other is an ancestor of node.
Inherited from
Node.DOCUMENT_POSITION_CONTAINS
DOCUMENT_POSITION_DISCONNECTED
readonlyDOCUMENT_POSITION_DISCONNECTED:1
Set when node and other are not in the same tree.
Inherited from
Node.DOCUMENT_POSITION_DISCONNECTED
DOCUMENT_POSITION_FOLLOWING
readonlyDOCUMENT_POSITION_FOLLOWING:4
Set when other is following node.
Inherited from
Node.DOCUMENT_POSITION_FOLLOWING
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
readonlyDOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:32
Inherited from
Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
DOCUMENT_POSITION_PRECEDING
readonlyDOCUMENT_POSITION_PRECEDING:2
Set when other is preceding node.
Inherited from
Node.DOCUMENT_POSITION_PRECEDING
DOCUMENT_TYPE_NODE
readonlyDOCUMENT_TYPE_NODE:10
node is a doctype.
Inherited from
Node.DOCUMENT_TYPE_NODE
ELEMENT_NODE
readonlyELEMENT_NODE:1
node is an element.
Inherited from
Node.ELEMENT_NODE
ENTITY_NODE
readonlyENTITY_NODE:6
Inherited from
Node.ENTITY_NODE
ENTITY_REFERENCE_NODE
readonlyENTITY_REFERENCE_NODE:5
Inherited from
Node.ENTITY_REFERENCE_NODE
firstChild
readonlyfirstChild:null|ChildNode
Returns the first child.
Inherited from
Node.firstChild
firstElementChild
readonlyfirstElementChild:null|Element
Returns the first child that is an element, and null otherwise.
Inherited from
ParentNode.firstElementChild
id
id:
string
Returns the value of element's id content attribute. Can be set to change it.
innerHTML
innerHTML:
string
isConnected
readonlyisConnected:boolean
Returns true if node is connected and false otherwise.
Inherited from
Node.isConnected
lastChild
readonlylastChild:null|ChildNode
Returns the last child.
Inherited from
Node.lastChild
lastElementChild
readonlylastElementChild:null|Element
Returns the last child that is an element, and null otherwise.
Inherited from
ParentNode.lastElementChild
localName
readonlylocalName:string
Returns the local name.
namespaceURI
readonlynamespaceURI:null|string
Returns the namespace.
nextElementSibling
readonlynextElementSibling:null|Element
Returns the first following sibling that is an element, and null otherwise.
Inherited from
NonDocumentTypeChildNode.nextElementSibling
nextSibling
readonlynextSibling:null|ChildNode
Returns the next sibling.
Inherited from
Node.nextSibling
nodeName
readonlynodeName:string
Returns a string appropriate for the type of node.
Inherited from
Node.nodeName
nodeType
readonlynodeType:number
Returns the type of node.
Inherited from
Node.nodeType
nodeValue
nodeValue:
null|string
Inherited from
Node.nodeValue
NOTATION_NODE
readonlyNOTATION_NODE:12
Inherited from
Node.NOTATION_NODE
onfullscreenchange
onfullscreenchange:
null| (this,ev) =>any
onfullscreenerror
onfullscreenerror:
null| (this,ev) =>any
outerHTML
outerHTML:
string
ownerDocument
readonlyownerDocument:Document
Returns the node document. Returns null for documents.
Overrides
Node.ownerDocument
parentElement
readonlyparentElement:null|HTMLElement
Returns the parent element.
Inherited from
Node.parentElement
parentNode
readonlyparentNode:null|ParentNode
Returns the parent.
Inherited from
Node.parentNode
part
readonlypart:DOMTokenList
prefix
readonlyprefix:null|string
Returns the namespace prefix.
previousElementSibling
readonlypreviousElementSibling:null|Element
Returns the first preceding sibling that is an element, and null otherwise.
Inherited from
NonDocumentTypeChildNode.previousElementSibling
previousSibling
readonlypreviousSibling:null|ChildNode
Returns the previous sibling.
Inherited from
Node.previousSibling
PROCESSING_INSTRUCTION_NODE
readonlyPROCESSING_INSTRUCTION_NODE:7
node is a ProcessingInstruction node.
Inherited from
Node.PROCESSING_INSTRUCTION_NODE
role
role:
null|string
Inherited from
ARIAMixin.role
scrollHeight
readonlyscrollHeight:number
scrollLeft
scrollLeft:
number
scrollTop
scrollTop:
number
scrollWidth
readonlyscrollWidth:number
shadowRoot
readonlyshadowRoot:null|ShadowRoot
Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise.
slot
slot:
string
Returns the value of element's slot content attribute. Can be set to change it.
style
style:
CSSStyleDeclaration
tagName
readonlytagName:string
Returns the HTML-uppercased qualified name.
TEXT_NODE
readonlyTEXT_NODE:3
node is a Text node.
Inherited from
Node.TEXT_NODE
textContent
textContent:
null|string
Inherited from
Node.textContent
Methods
addEventListener()
Call Signature
addEventListener<
K>(type,listener,options?):void
Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
Type Parameters
| Type Parameter |
|---|
K extends keyof ElementEventMap |
Parameters
| Parameter | Type |
|---|---|
type | K |
listener | (this, ev) => any |
options? | boolean | AddEventListenerOptions |
Returns
void
Overrides
Node.addEventListener
Call Signature
addEventListener(
type,listener,options?):void
Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
Parameters
| Parameter | Type |
|---|---|
type | string |
listener | EventListenerOrEventListenerObject |
options? | boolean | AddEventListenerOptions |
Returns
void
Overrides
Node.addEventListener
after()
after(...
nodes):void
Inserts nodes just after node, while replacing strings in nodes with equivalent Text nodes.
Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
Parameters
| Parameter | Type |
|---|---|
...nodes | (string | Node)[] |
Returns
void
Inherited from
ChildNode.after
animate()
animate(
keyframes,options?):Animation
Parameters
| Parameter | Type |
|---|---|
keyframes | null | Keyframe[] | PropertyIndexedKeyframes |
options? | number | KeyframeAnimationOptions |
Returns
Animation
Inherited from
Animatable.animate
append()
append(...
nodes):void
Inserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes.
Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
Parameters
| Parameter | Type |
|---|---|
...nodes | (string | Node)[] |
Returns
void
Inherited from
ParentNode.append
appendChild()
appendChild<
T>(node):T
Type Parameters
| Type Parameter |
|---|
T extends Node |
Parameters
| Parameter | Type |
|---|---|
node | T |
Returns
T
Inherited from
Node.appendChild
attachShadow()
attachShadow(
init):ShadowRoot
Creates a shadow root for element and returns it.
Parameters
| Parameter | Type |
|---|---|
init | ShadowRootInit |
Returns
ShadowRoot
before()
before(...
nodes):void
Inserts nodes just before node, while replacing strings in nodes with equivalent Text nodes.
Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
Parameters
| Parameter | Type |
|---|---|
...nodes | (string | Node)[] |
Returns
void
Inherited from
ChildNode.before
checkVisibility()
checkVisibility(
options?):boolean
Parameters
| Parameter | Type |
|---|---|
options? | CheckVisibilityOptions |
Returns
boolean
cloneNode()
cloneNode(
deep?):Node
Returns a copy of node. If deep is true, the copy also includes the node's descendants.
Parameters
| Parameter | Type |
|---|---|
deep? | boolean |
Returns
Node
Inherited from
Node.cloneNode
closest()
Call Signature
closest<
K>(selector):null|HTMLElementTagNameMap[K]
Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise.
Type Parameters
| Type Parameter |
|---|
K extends keyof HTMLElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
selector | K |
Returns
null | HTMLElementTagNameMap[K]
Call Signature
closest<
K>(selector):null|SVGElementTagNameMap[K]
Type Parameters
| Type Parameter |
|---|
K extends keyof SVGElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
selector | K |
Returns
null | SVGElementTagNameMap[K]
Call Signature
closest<
K>(selector):null|MathMLElementTagNameMap[K]
Type Parameters
| Type Parameter |
|---|
K extends keyof MathMLElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
selector | K |
Returns
null | MathMLElementTagNameMap[K]
Call Signature
closest<
E>(selectors):null|E
Type Parameters
| Type Parameter | Default type |
|---|---|
E extends Element | Element |
Parameters
| Parameter | Type |
|---|---|
selectors | string |
Returns
null | E
compareDocumentPosition()
compareDocumentPosition(
other):number
Returns a bitmask indicating the position of other relative to node.
Parameters
| Parameter | Type |
|---|---|
other | Node |
Returns
number
Inherited from
Node.compareDocumentPosition
computedStyleMap()
computedStyleMap():
StylePropertyMapReadOnly
Returns
StylePropertyMapReadOnly
contains()
contains(
other):boolean
Returns true if other is an inclusive descendant of node, and false otherwise.
Parameters
| Parameter | Type |
|---|---|
other | null | Node |
Returns
boolean
Inherited from
Node.contains
dispatchEvent()
dispatchEvent(
event):boolean
Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
Parameters
| Parameter | Type |
|---|---|
event | Event |
Returns
boolean
Inherited from
Node.dispatchEvent
getAnimations()
getAnimations(
options?):Animation[]
Parameters
| Parameter | Type |
|---|---|
options? | GetAnimationsOptions |
Returns
Animation[]
Inherited from
Animatable.getAnimations
getAttribute()
getAttribute(
qualifiedName):null|string
Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise.
Parameters
| Parameter | Type |
|---|---|
qualifiedName | string |
Returns
null | string
getAttributeNames()
getAttributeNames():
string[]
Returns the qualified names of all element's attributes. Can contain duplicates.
Returns
string[]
getAttributeNode()
getAttributeNode(
qualifiedName):null|Attr
Parameters
| Parameter | Type |
|---|---|
qualifiedName | string |
Returns
null | Attr
getAttributeNodeNS()
getAttributeNodeNS(
namespace,localName):null|Attr
Parameters
| Parameter | Type |
|---|---|
namespace | null | string |
localName | string |
Returns
null | Attr
getAttributeNS()
getAttributeNS(
namespace,localName):null|string
Returns element's attribute whose namespace is namespace and local name is localName, and null if there is no such attribute otherwise.
Parameters
| Parameter | Type |
|---|---|
namespace | null | string |
localName | string |
Returns
null | string
getBoundingClientRect()
getBoundingClientRect():
DOMRect
Returns
DOMRect
getClientRects()
getClientRects():
DOMRectList
Returns
DOMRectList
getElementsByClassName()
getElementsByClassName(
classNames):HTMLCollectionOf<Element>
Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.
Parameters
| Parameter | Type |
|---|---|
classNames | string |
Returns
HTMLCollectionOf<Element>
getElementsByTagName()
Call Signature
getElementsByTagName<
K>(qualifiedName):HTMLCollectionOf<HTMLElementTagNameMap[K]>
Type Parameters
| Type Parameter |
|---|
K extends keyof HTMLElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
qualifiedName | K |
Returns
HTMLCollectionOf<HTMLElementTagNameMap[K]>
Call Signature
getElementsByTagName<
K>(qualifiedName):HTMLCollectionOf<SVGElementTagNameMap[K]>
Type Parameters
| Type Parameter |
|---|
K extends keyof SVGElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
qualifiedName | K |
Returns
HTMLCollectionOf<SVGElementTagNameMap[K]>
Call Signature
getElementsByTagName<
K>(qualifiedName):HTMLCollectionOf<MathMLElementTagNameMap[K]>
Type Parameters
| Type Parameter |
|---|
K extends keyof MathMLElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
qualifiedName | K |
Returns
HTMLCollectionOf<MathMLElementTagNameMap[K]>
Call Signature
getElementsByTagName<
K>(qualifiedName):HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>
Type Parameters
| Type Parameter |
|---|
K extends keyof HTMLElementDeprecatedTagNameMap |
Parameters
| Parameter | Type |
|---|---|
qualifiedName | K |
Returns
HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>
Deprecated
Call Signature
getElementsByTagName(
qualifiedName):HTMLCollectionOf<Element>
Parameters
| Parameter | Type |
|---|---|
qualifiedName | string |
Returns
HTMLCollectionOf<Element>
getElementsByTagNameNS()
Call Signature
getElementsByTagNameNS(
namespaceURI,localName):HTMLCollectionOf<HTMLElement>
Parameters
| Parameter | Type |
|---|---|
namespaceURI | "http://www.w3.org/1999/xhtml" |
localName | string |
Returns
HTMLCollectionOf<HTMLElement>
Call Signature
getElementsByTagNameNS(
namespaceURI,localName):HTMLCollectionOf<SVGElement>
Parameters
| Parameter | Type |
|---|---|
namespaceURI | "http://www.w3.org/2000/svg" |
localName | string |
Returns
HTMLCollectionOf<SVGElement>
Call Signature
getElementsByTagNameNS(
namespaceURI,localName):HTMLCollectionOf<MathMLElement>
Parameters
| Parameter | Type |
|---|---|
namespaceURI | "http://www.w3.org/1998/Math/MathML" |
localName | string |
Returns
HTMLCollectionOf<MathMLElement>
Call Signature
getElementsByTagNameNS(
namespace,localName):HTMLCollectionOf<Element>
Parameters
| Parameter | Type |
|---|---|
namespace | null | string |
localName | string |
Returns
HTMLCollectionOf<Element>
getHTML()
getHTML(
options?):string
Parameters
| Parameter | Type |
|---|---|
options? | GetHTMLOptions |
Returns
string
getRootNode()
getRootNode(
options?):Node
Returns node's root.
Parameters
| Parameter | Type |
|---|---|
options? | GetRootNodeOptions |
Returns
Node
Inherited from
Node.getRootNode
hasAttribute()
hasAttribute(
qualifiedName):boolean
Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise.
Parameters
| Parameter | Type |
|---|---|
qualifiedName | string |
Returns
boolean
hasAttributeNS()
hasAttributeNS(
namespace,localName):boolean
Returns true if element has an attribute whose namespace is namespace and local name is localName.
Parameters
| Parameter | Type |
|---|---|
namespace | null | string |
localName | string |
Returns
boolean
hasAttributes()
hasAttributes():
boolean
Returns true if element has attributes, and false otherwise.
Returns
boolean
hasChildNodes()
hasChildNodes():
boolean
Returns whether node has children.
Returns
boolean
Inherited from
Node.hasChildNodes
hasPointerCapture()
hasPointerCapture(
pointerId):boolean
Parameters
| Parameter | Type |
|---|---|
pointerId | number |
Returns
boolean
insertAdjacentElement()
insertAdjacentElement(
where,element):null|Element
Parameters
| Parameter | Type |
|---|---|
where | InsertPosition |
element | Element |
Returns
null | Element
insertAdjacentHTML()
insertAdjacentHTML(
position,string):void
Parameters
| Parameter | Type |
|---|---|
position | InsertPosition |
string | string |
Returns
void
insertAdjacentText()
insertAdjacentText(
where,data):void
Parameters
| Parameter | Type |
|---|---|
where | InsertPosition |
data | string |
Returns
void
insertBefore()
insertBefore<
T>(node,child):T
Type Parameters
| Type Parameter |
|---|
T extends Node |
Parameters
| Parameter | Type |
|---|---|
node | T |
child | null | Node |
Returns
T
Inherited from
Node.insertBefore
isDefaultNamespace()
isDefaultNamespace(
namespace):boolean
Parameters
| Parameter | Type |
|---|---|
namespace | null | string |
Returns
boolean
Inherited from
Node.isDefaultNamespace
isEqualNode()
isEqualNode(
otherNode):boolean
Returns whether node and otherNode have the same properties.
Parameters
| Parameter | Type |
|---|---|
otherNode | null | Node |
Returns
boolean
Inherited from
Node.isEqualNode
isSameNode()
isSameNode(
otherNode):boolean
Parameters
| Parameter | Type |
|---|---|
otherNode | null | Node |
Returns
boolean
Inherited from
Node.isSameNode
lookupNamespaceURI()
lookupNamespaceURI(
prefix):null|string
Parameters
| Parameter | Type |
|---|---|
prefix | null | string |
Returns
null | string
Inherited from
Node.lookupNamespaceURI
lookupPrefix()
lookupPrefix(
namespace):null|string
Parameters
| Parameter | Type |
|---|---|
namespace | null | string |
Returns
null | string
Inherited from
Node.lookupPrefix
matches()
matches(
selectors):boolean
Returns true if matching selectors against element's root yields element, and false otherwise.
Parameters
| Parameter | Type |
|---|---|
selectors | string |
Returns
boolean
normalize()
normalize():
void
Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.
Returns
void
Inherited from
Node.normalize
prepend()
prepend(...
nodes):void
Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes.
Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
Parameters
| Parameter | Type |
|---|---|
...nodes | (string | Node)[] |
Returns
void
Inherited from
ParentNode.prepend
querySelector()
Call Signature
querySelector<
K>(selectors):null|HTMLElementTagNameMap[K]
Returns the first element that is a descendant of node that matches selectors.
Type Parameters
| Type Parameter |
|---|
K extends keyof HTMLElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
selectors | K |
Returns
null | HTMLElementTagNameMap[K]
Inherited from
ParentNode.querySelector
Call Signature
querySelector<
K>(selectors):null|SVGElementTagNameMap[K]
Type Parameters
| Type Parameter |
|---|
K extends keyof SVGElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
selectors | K |
Returns
null | SVGElementTagNameMap[K]
Inherited from
ParentNode.querySelector
Call Signature
querySelector<
K>(selectors):null|MathMLElementTagNameMap[K]
Type Parameters
| Type Parameter |
|---|
K extends keyof MathMLElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
selectors | K |
Returns
null | MathMLElementTagNameMap[K]
Inherited from
ParentNode.querySelector
Call Signature
querySelector<
K>(selectors):null|HTMLElementDeprecatedTagNameMap[K]
Type Parameters
| Type Parameter |
|---|
K extends keyof HTMLElementDeprecatedTagNameMap |
Parameters
| Parameter | Type |
|---|---|
selectors | K |
Returns
null | HTMLElementDeprecatedTagNameMap[K]
Deprecated
Inherited from
ParentNode.querySelector
Call Signature
querySelector<
E>(selectors):null|E
Type Parameters
| Type Parameter | Default type |
|---|---|
E extends Element | Element |
Parameters
| Parameter | Type |
|---|---|
selectors | string |
Returns
null | E
Inherited from
ParentNode.querySelector
querySelectorAll()
Call Signature
querySelectorAll<
K>(selectors):NodeListOf<HTMLElementTagNameMap[K]>
Returns all element descendants of node that match selectors.
Type Parameters
| Type Parameter |
|---|
K extends keyof HTMLElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
selectors | K |
Returns
NodeListOf<HTMLElementTagNameMap[K]>
Inherited from
ParentNode.querySelectorAll
Call Signature
querySelectorAll<
K>(selectors):NodeListOf<SVGElementTagNameMap[K]>
Type Parameters
| Type Parameter |
|---|
K extends keyof SVGElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
selectors | K |
Returns
NodeListOf<SVGElementTagNameMap[K]>
Inherited from
ParentNode.querySelectorAll
Call Signature
querySelectorAll<
K>(selectors):NodeListOf<MathMLElementTagNameMap[K]>
Type Parameters
| Type Parameter |
|---|
K extends keyof MathMLElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
selectors | K |
Returns
NodeListOf<MathMLElementTagNameMap[K]>
Inherited from
ParentNode.querySelectorAll
Call Signature
querySelectorAll<
K>(selectors):NodeListOf<HTMLElementDeprecatedTagNameMap[K]>
Type Parameters
| Type Parameter |
|---|
K extends keyof HTMLElementDeprecatedTagNameMap |
Parameters
| Parameter | Type |
|---|---|
selectors | K |
Returns
NodeListOf<HTMLElementDeprecatedTagNameMap[K]>
Deprecated
Inherited from
ParentNode.querySelectorAll
Call Signature
querySelectorAll<
E>(selectors):NodeListOf<E>
Type Parameters
| Type Parameter | Default type |
|---|---|
E extends Element | Element |
Parameters
| Parameter | Type |
|---|---|
selectors | string |
Returns
NodeListOf<E>
Inherited from
ParentNode.querySelectorAll
releasePointerCapture()
releasePointerCapture(
pointerId):void
Parameters
| Parameter | Type |
|---|---|
pointerId | number |
Returns
void
remove()
remove():
void
Removes node.
Returns
void
Inherited from
ChildNode.remove
removeAttribute()
removeAttribute(
qualifiedName):void
Removes element's first attribute whose qualified name is qualifiedName.
Parameters
| Parameter | Type |
|---|---|
qualifiedName | string |
Returns
void
removeAttributeNode()
removeAttributeNode(
attr):Attr
Parameters
| Parameter | Type |
|---|---|
attr | Attr |
Returns
Attr
removeAttributeNS()
removeAttributeNS(
namespace,localName):void
Removes element's attribute whose namespace is namespace and local name is localName.
Parameters
| Parameter | Type |
|---|---|
namespace | null | string |
localName | string |
Returns
void
removeChild()
removeChild<
T>(child):T
Type Parameters
| Type Parameter |
|---|
T extends Node |
Parameters
| Parameter | Type |
|---|---|
child | T |
Returns
T
Inherited from
Node.removeChild
removeEventListener()
Call Signature
removeEventListener<
K>(type,listener,options?):void
Removes the event listener in target's event listener list with the same type, callback, and options.
Type Parameters
| Type Parameter |
|---|
K extends keyof ElementEventMap |
Parameters
| Parameter | Type |
|---|---|
type | K |
listener | (this, ev) => any |
options? | boolean | EventListenerOptions |
Returns
void
Overrides
Node.removeEventListener
Call Signature
removeEventListener(
type,listener,options?):void
Removes the event listener in target's event listener list with the same type, callback, and options.
Parameters
| Parameter | Type |
|---|---|
type | string |
listener | EventListenerOrEventListenerObject |
options? | boolean | EventListenerOptions |
Returns
void
Overrides
Node.removeEventListener
replaceChild()
replaceChild<
T>(node,child):T
Type Parameters
| Type Parameter |
|---|
T extends Node |
Parameters
| Parameter | Type |
|---|---|
node | Node |
child | T |
Returns
T
Inherited from
Node.replaceChild
replaceChildren()
replaceChildren(...
nodes):void
Replace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes.
Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
Parameters
| Parameter | Type |
|---|---|
...nodes | (string | Node)[] |
Returns
void
Inherited from
ParentNode.replaceChildren
replaceWith()
replaceWith(...
nodes):void
Replaces node with nodes, while replacing strings in nodes with equivalent Text nodes.
Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
Parameters
| Parameter | Type |
|---|---|
...nodes | (string | Node)[] |
Returns
void
Inherited from
ChildNode.replaceWith
requestFullscreen()
requestFullscreen(
options?):Promise<void>
Displays element fullscreen and resolves promise when done.
When supplied, options's navigationUI member indicates whether showing navigation UI while in fullscreen is preferred or not. If set to "show", navigation simplicity is preferred over screen space, and if set to "hide", more screen space is preferred. User agents are always free to honor user preference over the application's. The default value "auto" indicates no application preference.
Parameters
| Parameter | Type |
|---|---|
options? | FullscreenOptions |
Returns
Promise<void>
requestPointerLock()
requestPointerLock(
options?):Promise<void>
Parameters
| Parameter | Type |
|---|---|
options? | PointerLockOptions |
Returns
Promise<void>
scroll()
Call Signature
scroll(
options?):void
Parameters
| Parameter | Type |
|---|---|
options? | ScrollToOptions |
Returns
void
Call Signature
scroll(
x,y):void
Parameters
| Parameter | Type |
|---|---|
x | number |
y | number |
Returns
void
scrollBy()
Call Signature
scrollBy(
options?):void
Parameters
| Parameter | Type |
|---|---|
options? | ScrollToOptions |
Returns
void
Call Signature
scrollBy(
x,y):void
Parameters
| Parameter | Type |
|---|---|
x | number |
y | number |
Returns
void
scrollIntoView()
scrollIntoView(
arg?):void
Parameters
| Parameter | Type |
|---|---|
arg? | boolean | ScrollIntoViewOptions |
Returns
void
scrollTo()
Call Signature
scrollTo(
options?):void
Parameters
| Parameter | Type |
|---|---|
options? | ScrollToOptions |
Returns
void
Call Signature
scrollTo(
x,y):void
Parameters
| Parameter | Type |
|---|---|
x | number |
y | number |
Returns
void
setAttribute()
setAttribute(
qualifiedName,value):void
Sets the value of element's first attribute whose qualified name is qualifiedName to value.
Parameters
| Parameter | Type |
|---|---|
qualifiedName | string |
value | string |
Returns
void
setAttributeNode()
setAttributeNode(
attr):null|Attr
Parameters
| Parameter | Type |
|---|---|
attr | Attr |
Returns
null | Attr
setAttributeNodeNS()
setAttributeNodeNS(
attr):null|Attr
Parameters
| Parameter | Type |
|---|---|
attr | Attr |
Returns
null | Attr
setAttributeNS()
setAttributeNS(
namespace,qualifiedName,value):void
Sets the value of element's attribute whose namespace is namespace and local name is localName to value.
Parameters
| Parameter | Type |
|---|---|
namespace | null | string |
qualifiedName | string |
value | string |
Returns
void
setHTMLUnsafe()
setHTMLUnsafe(
html):void
Parameters
| Parameter | Type |
|---|---|
html | string |
Returns
void
setPointerCapture()
setPointerCapture(
pointerId):void
Parameters
| Parameter | Type |
|---|---|
pointerId | number |
Returns
void
toggleAttribute()
toggleAttribute(
qualifiedName,force?):boolean
If force is not given, "toggles" qualifiedName, removing it if it is present and adding it if it is not present. If force is true, adds qualifiedName. If force is false, removes qualifiedName.
Returns true if qualifiedName is now present, and false otherwise.
Parameters
| Parameter | Type |
|---|---|
qualifiedName | string |
force? | boolean |
Returns
boolean
webkitMatchesSelector()
webkitMatchesSelector(
selectors):boolean
Parameters
| Parameter | Type |
|---|---|
selectors | string |
Returns
boolean
Deprecated
This is a legacy alias of matches.