HTMLIFrameElement interface

The HTMLIFrameElement interface provides special properties and methods (beyond those of the HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of inline frame elements.

MDN Reference

Extends

HTMLElement

Properties

align
allow

The allow property of the HTMLIFrameElement interface indicates the Permissions Policy specified for this <iframe> element.

MDN Reference

allowFullscreen

The allowFullscreen property of the HTMLIFrameElement interface is a boolean value that reflects the allowfullscreen attribute of the iframe element, indicating whether to allow the iframe's contents to use Element.requestFullscreen.

MDN Reference

classList

The Element.classList is a read-only property that returns a live DOMTokenList collection of the class attributes of the element.

MDN Reference

contentDocument

If the iframe and the iframe's parent document are Same Origin, returns a Document (that is, the active document in the inline frame's nested browsing context), else returns null.

MDN Reference

contentWindow

The contentWindow property returns the Window object of an HTMLIFrameElement.

MDN Reference

frameBorder
height

The height property of the HTMLIFrameElement interface returns a string that reflects the height attribute of the iframe element, indicating the height of the frame in CSS pixels.

MDN Reference

loading

The loading property of the HTMLIFrameElement interface is a string that provides a hint to the user agent indicating whether the iframe should be loaded immediately on page load, or only when it is needed.

MDN Reference

longDesc
marginHeight
marginWidth
mozRequestFullScreen
msRequestFullscreen
name

The name property of the HTMLIFrameElement interface is a string value that reflects the name attribute of the iframe element, indicating the specific name of the <iframe> element.

MDN Reference

part

The part property of the Element interface represents the part identifier(s) of the element (i.e., set using the part attribute), returned as a DOMTokenList.

MDN Reference

referrerPolicy

The HTMLIFrameElement.referrerPolicy property reflects the HTML referrerpolicy attribute of the resource.

MDN Reference

sandbox

The sandbox read-only property of the HTMLIFrameElement interface returns a DOMTokenList indicating extra restrictions on the behavior of the nested content.

MDN Reference

scrolling
src

The HTMLIFrameElement.src A string that reflects the src HTML attribute, containing the address of the content to be embedded.

MDN Reference

srcdoc

The srcdoc property of the HTMLIFrameElement specifies the content of the page.

MDN Reference

style

MDN Reference

textContent

MDN Reference

webkitRequestFullscreen
width

The width property of the HTMLIFrameElement interface returns a string that reflects the width attribute of the iframe element, indicating the width of the frame in CSS pixels.

MDN Reference

Inherited Properties

accessKey

The HTMLElement.accessKey property sets the keystroke which a user can press to jump to a given element.

MDN Reference

accessKeyLabel

The HTMLElement.accessKeyLabel read-only property returns a string containing the element's browser-assigned access key (if any); otherwise it returns an empty string.

MDN Reference

ariaActiveDescendantElement

MDN Reference

ariaAtomic

MDN Reference

ariaAutoComplete

MDN Reference

ariaBrailleLabel

MDN Reference

ariaBrailleRoleDescription

MDN Reference

ariaBusy

MDN Reference

ariaChecked

MDN Reference

ariaColCount

MDN Reference

ariaColIndex

MDN Reference

ariaColIndexText

MDN Reference

ariaColSpan

MDN Reference

ariaControlsElements

MDN Reference

ariaCurrent

MDN Reference

ariaDescribedByElements

MDN Reference

ariaDescription

MDN Reference

ariaDetailsElements

MDN Reference

ariaDisabled

MDN Reference

ariaErrorMessageElements

MDN Reference

ariaExpanded

MDN Reference

ariaFlowToElements

MDN Reference

ariaHasPopup

MDN Reference

ariaHidden

MDN Reference

ariaInvalid

MDN Reference

ariaKeyShortcuts

MDN Reference

ariaLabel

MDN Reference

ariaLabelledByElements

MDN Reference

ariaLevel

MDN Reference

ariaLive

MDN Reference

ariaModal

MDN Reference

ariaMultiLine

MDN Reference

ariaMultiSelectable

MDN Reference

ariaOrientation

MDN Reference

ariaOwnsElements

MDN Reference

ariaPlaceholder

MDN Reference

ariaPosInSet

MDN Reference

ariaPressed

MDN Reference

ariaReadOnly

MDN Reference

ariaRelevant

MDN Reference

ariaRequired

MDN Reference

ariaRoleDescription

MDN Reference

ariaRowCount

MDN Reference

ariaRowIndex

MDN Reference

ariaRowIndexText

MDN Reference

ariaRowSpan

MDN Reference

ariaSelected

MDN Reference

ariaSetSize

MDN Reference

ariaSort

MDN Reference

ariaValueMax

MDN Reference

ariaValueMin

MDN Reference

ariaValueNow

MDN Reference

ariaValueText

MDN Reference

assignedSlot

MDN Reference

attributes

The Element.attributes property returns a live collection of all attribute nodes registered to the specified node.

MDN Reference

attributeStyleMap

MDN Reference

ATTRIBUTE_NODE
autocapitalize

The autocapitalize property of the HTMLElement interface represents the element's capitalization behavior for user input.

MDN Reference

autocorrect

The autocorrect property of the HTMLElement interface controls whether or not autocorrection of editable text is enabled for spelling and/or punctuation errors.

MDN Reference

autofocus

MDN Reference

baseURI

The read-only baseURI property of the Node interface returns the absolute base URL of the document containing the node.

MDN Reference

CDATA_SECTION_NODE

node is a CDATASection node.

childElementCount

MDN Reference

childNodes

The read-only childNodes property of the Node interface returns a live the first child node is assigned index 0.

MDN Reference

children

Returns the child elements.

MDN Reference

className

The className property of the of the specified element.

MDN Reference

clientHeight

The clientHeight read-only property of the Element interface is zero for elements with no CSS or inline layout boxes; otherwise, it's the inner height of an element in pixels.

MDN Reference

clientLeft

The clientLeft read-only property of the Element interface returns the width of the left border of an element in pixels.

MDN Reference

clientTop

The clientTop read-only property of the Element interface returns the width of the top border of an element in pixels.

MDN Reference

clientWidth

The clientWidth read-only property of the Element interface is zero for inline elements and elements with no CSS; otherwise, it's the inner width of an element in pixels.

MDN Reference

COMMENT_NODE

node is a Comment node.

contentEditable

MDN Reference

currentCSSZoom

The currentCSSZoom read-only property of the Element interface provides the 'effective' CSS zoom of an element, taking into account the zoom applied to the element and all its parent elements.

MDN Reference

dataset

MDN Reference

dir

The HTMLElement.dir property indicates the text writing directionality of the content of the current element.

MDN Reference

DOCUMENT_FRAGMENT_NODE

node is a DocumentFragment node.

DOCUMENT_NODE

node is a document.

DOCUMENT_POSITION_CONTAINED_BY

Set when other is a descendant of node.

DOCUMENT_POSITION_CONTAINS

Set when other is an ancestor of node.

DOCUMENT_POSITION_DISCONNECTED

Set when node and other are not in the same tree.

DOCUMENT_POSITION_FOLLOWING

Set when other is following node.

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
DOCUMENT_POSITION_PRECEDING

Set when other is preceding node.

DOCUMENT_TYPE_NODE

node is a doctype.

draggable

The draggable property of the HTMLElement interface gets and sets a Boolean primitive indicating if the element is draggable.

MDN Reference

ELEMENT_NODE

node is an element.

enterKeyHint

MDN Reference

ENTITY_NODE
ENTITY_REFERENCE_NODE
firstChild

The read-only firstChild property of the Node interface returns the node's first child in the tree, or null if the node has no children.

MDN Reference

firstElementChild

Returns the first child that is an element, and null otherwise.

MDN Reference

hidden

The HTMLElement property hidden reflects the value of the element's hidden attribute.

MDN Reference

id

The id property of the Element interface represents the element's identifier, reflecting the id global attribute.

MDN Reference

inert

The HTMLElement property inert reflects the value of the element's inert attribute.

MDN Reference

innerHTML

The innerHTML property of the Element interface gets or sets the HTML or XML markup contained within the element.

MDN Reference

innerText

The innerText property of the HTMLElement interface represents the rendered text content of a node and its descendants.

MDN Reference

inputMode

MDN Reference

isConnected

The read-only isConnected property of the Node interface returns a boolean indicating whether the node is connected (directly or indirectly) to a Document object.

MDN Reference

isContentEditable

MDN Reference

lang

The lang property of the HTMLElement interface indicates the base language of an element's attribute values and text content, in the form of a MISSING: RFC(5646, 'BCP 47 language identifier tag')].

MDN Reference

lastChild

The read-only lastChild property of the Node interface returns the last child of the node, or null if there are no child nodes.

MDN Reference

lastElementChild

Returns the last child that is an element, and null otherwise.

MDN Reference

localName

The Element.localName read-only property returns the local part of the qualified name of an element.

MDN Reference

namespaceURI

The Element.namespaceURI read-only property returns the namespace URI of the element, or null if the element is not in a namespace.

MDN Reference

nextElementSibling

Returns the first following sibling that is an element, and null otherwise.

MDN Reference

nextSibling

The read-only nextSibling property of the Node interface returns the node immediately following the specified one in their parent's Node.childNodes, or returns null if the specified node is the last child in the parent element.

MDN Reference

nodeName

The read-only nodeName property of Node returns the name of the current node as a string.

MDN Reference

nodeType

The read-only nodeType property of a Node interface is an integer that identifies what the node is.

MDN Reference

nodeValue

The nodeValue property of the Node interface returns or sets the value of the current node.

MDN Reference

nonce

MDN Reference

NOTATION_NODE
offsetHeight

The offsetHeight read-only property of the HTMLElement interface returns the height of an element, including vertical padding and borders, as an integer.

MDN Reference

offsetLeft

The offsetLeft read-only property of the HTMLElement interface returns the number of pixels that the upper left corner of the current element is offset to the left within the HTMLElement.offsetParent node.

MDN Reference

offsetParent

The HTMLElement.offsetParent read-only property returns a reference to the element which is the closest (nearest in the containment hierarchy) positioned ancestor element.

MDN Reference

offsetTop

The offsetTop read-only property of the HTMLElement interface returns the distance from the outer border of the current element (including its margin) to the top padding edge of the HTMLelement.offsetParent, the closest positioned ancestor element.

MDN Reference

offsetWidth

The offsetWidth read-only property of the HTMLElement interface returns the layout width of an element as an integer.

MDN Reference

onabort

MDN Reference

onanimationcancel

MDN Reference

onanimationend

MDN Reference

onanimationiteration

MDN Reference

onanimationstart

MDN Reference

onauxclick

MDN Reference

onbeforeinput

MDN Reference

onbeforematch

MDN Reference

onbeforetoggle

MDN Reference

onblur

MDN Reference

oncancel

MDN Reference

oncanplay

MDN Reference

oncanplaythrough

MDN Reference

onchange

MDN Reference

onclick

MDN Reference

onclose

MDN Reference

oncontextlost

MDN Reference

oncontextmenu

MDN Reference

oncontextrestored

MDN Reference

oncopy

MDN Reference

oncuechange

MDN Reference

oncut

MDN Reference

ondblclick

MDN Reference

ondrag

MDN Reference

ondragend

MDN Reference

ondragenter

MDN Reference

ondragleave

MDN Reference

ondragover

MDN Reference

ondragstart

MDN Reference

ondrop

MDN Reference

ondurationchange

MDN Reference

onemptied

MDN Reference

onended

MDN Reference

onerror

MDN Reference

onfocus

MDN Reference

onformdata

MDN Reference

onfullscreenchange

MDN Reference

onfullscreenerror

MDN Reference

ongotpointercapture

MDN Reference

oninput

MDN Reference

oninvalid

MDN Reference

onkeydown

MDN Reference

onkeypress
onkeyup

MDN Reference

onload

MDN Reference

onloadeddata

MDN Reference

onloadedmetadata

MDN Reference

onloadstart

MDN Reference

onlostpointercapture

MDN Reference

onmousedown

MDN Reference

onmouseenter

MDN Reference

onmouseleave

MDN Reference

onmousemove

MDN Reference

onmouseout

MDN Reference

onmouseover

MDN Reference

onmouseup

MDN Reference

onpaste

MDN Reference

onpause

MDN Reference

onplay

MDN Reference

onplaying

MDN Reference

onpointercancel

MDN Reference

onpointerdown

MDN Reference

onpointerenter

MDN Reference

onpointerleave

MDN Reference

onpointermove

MDN Reference

onpointerout

MDN Reference

onpointerover

MDN Reference

onpointerrawupdate

Available only in secure contexts.

MDN Reference

onpointerup

MDN Reference

onprogress

MDN Reference

onratechange

MDN Reference

onreset

MDN Reference

onresize

MDN Reference

onscroll

MDN Reference

onscrollend

MDN Reference

onsecuritypolicyviolation

MDN Reference

onseeked

MDN Reference

onseeking

MDN Reference

onselect

MDN Reference

onselectionchange

MDN Reference

onselectstart

MDN Reference

onslotchange

MDN Reference

onstalled

MDN Reference

onsubmit

MDN Reference

onsuspend

MDN Reference

ontimeupdate

MDN Reference

ontoggle

MDN Reference

ontouchcancel

MDN Reference

ontouchend

MDN Reference

ontouchmove

MDN Reference

ontouchstart

MDN Reference

ontransitioncancel

MDN Reference

ontransitionend

MDN Reference

ontransitionrun

MDN Reference

ontransitionstart

MDN Reference

onvolumechange

MDN Reference

onwaiting

MDN Reference

onwebkitanimationend
onwebkitanimationiteration
onwebkitanimationstart
onwebkittransitionend
onwheel

MDN Reference

outerHTML

The outerHTML attribute of the Element DOM interface gets the serialized HTML fragment describing the element including its descendants.

MDN Reference

outerText

The outerText property of the HTMLElement interface returns the same value as HTMLElement.innerText.

MDN Reference

ownerDocument

The read-only ownerDocument property of the Node interface returns the top-level document object of the node.

MDN Reference

parentElement

The read-only parentElement property of Node interface returns the DOM node's parent Element, or null if the node either has no parent, or its parent isn't a DOM Element.

MDN Reference

parentNode

The read-only parentNode property of the Node interface returns the parent of the specified node in the DOM tree.

MDN Reference

popover

The popover property of the HTMLElement interface gets and sets an element's popover state via JavaScript ('auto', 'hint', or 'manual'), and can be used for feature detection.

MDN Reference

prefix

The Element.prefix read-only property returns the namespace prefix of the specified element, or null if no prefix is specified.

MDN Reference

previousElementSibling

Returns the first preceding sibling that is an element, and null otherwise.

MDN Reference

previousSibling

The read-only previousSibling property of the Node interface returns the node immediately preceding the specified one in its parent's or null if the specified node is the first in that list.

MDN Reference

PROCESSING_INSTRUCTION_NODE

node is a ProcessingInstruction node.

role

MDN Reference

scrollHeight

The scrollHeight read-only property of the Element interface is a measurement of the height of an element's content, including content not visible on the screen due to overflow.

MDN Reference

scrollLeft

The scrollLeft property of the Element interface gets or sets the number of pixels by which an element's content is scrolled from its left edge.

MDN Reference

scrollTop

The scrollTop property of the Element interface gets or sets the number of pixels by which an element's content is scrolled from its top edge.

MDN Reference

scrollWidth

The scrollWidth read-only property of the Element interface is a measurement of the width of an element's content, including content not visible on the screen due to overflow.

MDN Reference

shadowRoot

The Element.shadowRoot read-only property represents the shadow root hosted by the element.

MDN Reference

slot

The slot property of the Element interface returns the name of the shadow DOM slot the element is inserted in.

MDN Reference

spellcheck

The spellcheck property of the HTMLElement interface represents a boolean value that controls the spell-checking hint.

MDN Reference

tabIndex

MDN Reference

tagName

The tagName read-only property of the Element interface returns the tag name of the element on which it's called.

MDN Reference

TEXT_NODE

node is a Text node.

title

The HTMLElement.title property represents the title of the element: the text usually displayed in a 'tooltip' popup when the mouse is over the node.

MDN Reference

translate

The translate property of the HTMLElement interface indicates whether an element's attribute values and the values of its Text node children are to be translated when the page is localized, or whether to leave them unchanged.

MDN Reference

writingSuggestions

The writingSuggestions property of the HTMLElement interface is a string indicating if browser-provided writing suggestions should be enabled under the scope of the element or not.

MDN Reference

Inherited Methods

after((string | Node)[])

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.

MDN Reference

animate(Keyframe[] | PropertyIndexedKeyframes | null, number | KeyframeAnimationOptions)

MDN Reference

append((string | Node)[])

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.

MDN Reference

appendChild<T>(T)

The appendChild() method of the Node interface adds a node to the end of the list of children of a specified parent node.

MDN Reference

attachInternals()

The HTMLElement.attachInternals() method returns an ElementInternals object.

MDN Reference

attachShadow(ShadowRootInit)

The Element.attachShadow() method attaches a shadow DOM tree to the specified element and returns a reference to its ShadowRoot.

MDN Reference

before((string | Node)[])

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.

MDN Reference

blur()

MDN Reference

checkVisibility(CheckVisibilityOptions)

The checkVisibility() method of the Element interface checks whether the element is visible.

MDN Reference

click()

The HTMLElement.click() method simulates a mouse click on an element.

MDN Reference

cloneNode(boolean)

The cloneNode() method of the Node interface returns a duplicate of the node on which this method was called.

MDN Reference

closest<E>(string)
closest<K>(K)

The closest() method of the Element interface traverses the element and its parents (heading toward the document root) until it finds a node that matches the specified CSS selector.

MDN Reference

closest<K>(K)
closest<K>(K)
compareDocumentPosition(Node)

The compareDocumentPosition() method of the Node interface reports the position of its argument node relative to the node on which it is called.

MDN Reference

computedStyleMap()

The computedStyleMap() method of the Element interface returns a StylePropertyMapReadOnly interface which provides a read-only representation of a CSS declaration block that is an alternative to CSSStyleDeclaration.

MDN Reference

contains(Node | null)

The contains() method of the Node interface returns a boolean value indicating whether a node is a descendant of a given node, that is the node itself, one of its direct children (Node.childNodes), one of the children's direct children, and so on.

MDN Reference

dispatchEvent(Event)

The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.

MDN Reference

focus(FocusOptions)

MDN Reference

getAnimations(GetAnimationsOptions)

MDN Reference

getAttribute(string)

The getAttribute() method of the element.

MDN Reference

getAttributeNames()

The getAttributeNames() method of the array.

MDN Reference

getAttributeNode(string)

Returns the specified attribute of the specified element, as an Attr node.

MDN Reference

getAttributeNodeNS(string | null, string)

The getAttributeNodeNS() method of the Element interface returns the namespaced Attr node of an element.

MDN Reference

getAttributeNS(string | null, string)

The getAttributeNS() method of the Element interface returns the string value of the attribute with the specified namespace and name.

MDN Reference

getBoundingClientRect()

The Element.getBoundingClientRect() method returns a position relative to the viewport.

MDN Reference

getClientRects()

The getClientRects() method of the Element interface returns a collection of DOMRect objects that indicate the bounding rectangles for each CSS border box in a client.

MDN Reference

getElementsByClassName(string)

The Element method getElementsByClassName() returns a live specified class name or names.

MDN Reference

getElementsByTagName(string)
getElementsByTagName<K>(K)

The Element.getElementsByTagName() method returns a live All descendants of the specified element are searched, but not the element itself.

MDN Reference

getElementsByTagName<K>(K)
getElementsByTagName<K>(K)
getElementsByTagName<K>(K)
getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML", string)
getElementsByTagNameNS("http://www.w3.org/1999/xhtml", string)

The Element.getElementsByTagNameNS() method returns a live HTMLCollection of elements with the given tag name belonging to the given namespace.

MDN Reference

getElementsByTagNameNS("http://www.w3.org/2000/svg", string)
getElementsByTagNameNS(string | null, string)
getHTML(GetHTMLOptions)

The getHTML() method of the Element interface is used to serialize an element's DOM to an HTML string.

MDN Reference

getRootNode(GetRootNodeOptions)

The getRootNode() method of the Node interface returns the context object's root, which optionally includes the shadow root if it is available.

MDN Reference

hasAttribute(string)

The Element.hasAttribute() method returns a Boolean value indicating whether the specified element has the specified attribute or not.

MDN Reference

hasAttributeNS(string | null, string)

The hasAttributeNS() method of the Element interface returns a boolean value indicating whether the current element has the specified attribute with the specified namespace.

MDN Reference

hasAttributes()

The hasAttributes() method of the Element interface returns a boolean value indicating whether the current element has any attributes or not.

MDN Reference

hasChildNodes()

The hasChildNodes() method of the Node interface returns a boolean value indicating whether the given Node has child nodes or not.

MDN Reference

hasPointerCapture(number)

The hasPointerCapture() method of the pointer capture for the pointer identified by the given pointer ID.

MDN Reference

hidePopover()

The hidePopover() method of the HTMLElement interface hides a popover element (i.e., one that has a valid popover attribute) by removing it from the top layer and styling it with display: none.

MDN Reference

insertAdjacentElement(InsertPosition, Element)

The insertAdjacentElement() method of the relative to the element it is invoked upon.

MDN Reference

insertAdjacentHTML(InsertPosition, string)

The insertAdjacentHTML() method of the the resulting nodes into the DOM tree at a specified position.

MDN Reference

insertAdjacentText(InsertPosition, string)

The insertAdjacentText() method of the Element interface, given a relative position and a string, inserts a new text node at the given position relative to the element it is called from.

MDN Reference

insertBefore<T>(T, Node | null)

The insertBefore() method of the Node interface inserts a node before a reference node as a child of a specified parent node.

MDN Reference

isDefaultNamespace(string | null)

The isDefaultNamespace() method of the Node interface accepts a namespace URI as an argument.

MDN Reference

isEqualNode(Node | null)

The isEqualNode() method of the Node interface tests whether two nodes are equal.

MDN Reference

isSameNode(Node | null)

The isSameNode() method of the Node interface is a legacy alias the for the === strict equality operator.

MDN Reference

lookupNamespaceURI(string | null)

The lookupNamespaceURI() method of the Node interface takes a prefix as parameter and returns the namespace URI associated with it on the given node if found (and null if not).

MDN Reference

lookupPrefix(string | null)

The lookupPrefix() method of the Node interface returns a string containing the prefix for a given namespace URI, if present, and null if not.

MDN Reference

matches(string)

The matches() method of the Element interface tests whether the element would be selected by the specified CSS selector.

MDN Reference

normalize()

The normalize() method of the Node interface puts the specified node and all of its sub-tree into a normalized form.

MDN Reference

prepend((string | Node)[])

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.

MDN Reference

querySelector<E>(string)
querySelector<K>(K)

Returns the first element that is a descendant of node that matches selectors.

MDN Reference

querySelector<K>(K)
querySelector<K>(K)
querySelector<K>(K)
querySelectorAll<E>(string)
querySelectorAll<K>(K)

Returns all element descendants of node that match selectors.

MDN Reference

querySelectorAll<K>(K)
querySelectorAll<K>(K)
querySelectorAll<K>(K)
releasePointerCapture(number)

The releasePointerCapture() method of the previously set for a specific (PointerEvent) pointer.

MDN Reference

remove()

Removes node.

MDN Reference

removeAttribute(string)

The Element method removeAttribute() removes the attribute with the specified name from the element.

MDN Reference

removeAttributeNode(Attr)

The removeAttributeNode() method of the Element interface removes the specified Attr node from the element.

MDN Reference

removeAttributeNS(string | null, string)

The removeAttributeNS() method of the If you are working with HTML and you don't need to specify the requested attribute as being part of a specific namespace, use the Element.removeAttribute() method instead.

MDN Reference

removeChild<T>(T)

The removeChild() method of the Node interface removes a child node from the DOM and returns the removed node.

MDN Reference

replaceChild<T>(Node, T)

The replaceChild() method of the Node interface replaces a child node within the given (parent) node.

MDN Reference

replaceChildren((string | Node)[])

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.

MDN Reference

replaceWith((string | Node)[])

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.

MDN Reference

requestFullscreen(FullscreenOptions)

The Element.requestFullscreen() method issues an asynchronous request to make the element be displayed in fullscreen mode.

MDN Reference

requestPointerLock(PointerLockOptions)

The requestPointerLock() method of the Element interface lets you asynchronously ask for the pointer to be locked on the given element.

MDN Reference

scroll(number, number)
scroll(ScrollToOptions)

The scroll() method of the Element interface scrolls the element to a particular set of coordinates inside a given element.

MDN Reference

scrollBy(number, number)
scrollBy(ScrollToOptions)

The scrollBy() method of the Element interface scrolls an element by the given amount.

MDN Reference

scrollIntoView(boolean | ScrollIntoViewOptions)

The Element interface's scrollIntoView() method scrolls the element's ancestor containers such that the element on which scrollIntoView() is called is visible to the user.

MDN Reference

scrollTo(number, number)
scrollTo(ScrollToOptions)

The scrollTo() method of the Element interface scrolls to a particular set of coordinates inside a given element.

MDN Reference

setAttribute(string, string)

The setAttribute() method of the Element interface sets the value of an attribute on the specified element.

MDN Reference

setAttributeNode(Attr)

The setAttributeNode() method of the Element interface adds a new Attr node to the specified element.

MDN Reference

setAttributeNodeNS(Attr)

The setAttributeNodeNS() method of the Element interface adds a new namespaced Attr node to an element.

MDN Reference

setAttributeNS(string | null, string, string)

setAttributeNS adds a new attribute or changes the value of an attribute with the given namespace and name.

MDN Reference

setHTMLUnsafe(string)

The setHTMLUnsafe() method of the Element interface is used to parse a string of HTML into a DocumentFragment, optionally filtering out unwanted elements and attributes, and those that don't belong in the context, and then using it to replace the element's subtree in the DOM.

MDN Reference

setPointerCapture(number)

The setPointerCapture() method of the capture target of future pointer events.

MDN Reference

showPopover()

The showPopover() method of the HTMLElement interface shows a Popover_API element (i.e., one that has a valid popover attribute) by adding it to the top layer.

MDN Reference

toggleAttribute(string, boolean)

The toggleAttribute() method of the present and adding it if it is not present) on the given element.

MDN Reference

togglePopover(boolean)

The togglePopover() method of the HTMLElement interface toggles a Popover_API element (i.e., one that has a valid popover attribute) between the hidden and showing states.

MDN Reference

webkitMatchesSelector(string)

Property Details

align

Warning

This API is now deprecated.

align: string

Property Value

string

allow

The allow property of the HTMLIFrameElement interface indicates the Permissions Policy specified for this <iframe> element.

MDN Reference

allow: string

Property Value

string

allowFullscreen

The allowFullscreen property of the HTMLIFrameElement interface is a boolean value that reflects the allowfullscreen attribute of the iframe element, indicating whether to allow the iframe's contents to use Element.requestFullscreen.

MDN Reference

allowFullscreen: boolean

Property Value

boolean

classList

The Element.classList is a read-only property that returns a live DOMTokenList collection of the class attributes of the element.

MDN Reference

DOMTokenList classList

Property Value

DOMTokenList

contentDocument

If the iframe and the iframe's parent document are Same Origin, returns a Document (that is, the active document in the inline frame's nested browsing context), else returns null.

MDN Reference

contentDocument: Document | null

Property Value

Document | null

contentWindow

The contentWindow property returns the Window object of an HTMLIFrameElement.

MDN Reference

contentWindow: Window | null

Property Value

Window | null

frameBorder

Warning

This API is now deprecated.

frameBorder: string

Property Value

string

height

The height property of the HTMLIFrameElement interface returns a string that reflects the height attribute of the iframe element, indicating the height of the frame in CSS pixels.

MDN Reference

height: string

Property Value

string

loading

The loading property of the HTMLIFrameElement interface is a string that provides a hint to the user agent indicating whether the iframe should be loaded immediately on page load, or only when it is needed.

MDN Reference

loading: "eager" | "lazy"

Property Value

"eager" | "lazy"

longDesc

Warning

This API is now deprecated.

longDesc: string

Property Value

string

marginHeight

Warning

This API is now deprecated.

marginHeight: string

Property Value

string

marginWidth

Warning

This API is now deprecated.

marginWidth: string

Property Value

string

mozRequestFullScreen

mozRequestFullScreen: Function

Property Value

Function

msRequestFullscreen

msRequestFullscreen: Function

Property Value

Function

name

The name property of the HTMLIFrameElement interface is a string value that reflects the name attribute of the iframe element, indicating the specific name of the <iframe> element.

MDN Reference

name: string

Property Value

string

part

The part property of the Element interface represents the part identifier(s) of the element (i.e., set using the part attribute), returned as a DOMTokenList.

MDN Reference

DOMTokenList part

Property Value

DOMTokenList

referrerPolicy

The HTMLIFrameElement.referrerPolicy property reflects the HTML referrerpolicy attribute of the resource.

MDN Reference

referrerPolicy: ReferrerPolicy

Property Value

ReferrerPolicy

sandbox

The sandbox read-only property of the HTMLIFrameElement interface returns a DOMTokenList indicating extra restrictions on the behavior of the nested content.

MDN Reference

DOMTokenList sandbox

Property Value

DOMTokenList

scrolling

Warning

This API is now deprecated.

scrolling: string

Property Value

string

src

The HTMLIFrameElement.src A string that reflects the src HTML attribute, containing the address of the content to be embedded.

MDN Reference

src: string

Property Value

string

srcdoc

The srcdoc property of the HTMLIFrameElement specifies the content of the page.

MDN Reference

srcdoc: string

Property Value

string

style

MDN Reference

CSSStyleDeclaration style

Property Value

CSSStyleDeclaration

textContent

MDN Reference

string textContent

Property Value

string

webkitRequestFullscreen

webkitRequestFullscreen: () => void

Property Value

() => void

width

The width property of the HTMLIFrameElement interface returns a string that reflects the width attribute of the iframe element, indicating the width of the frame in CSS pixels.

MDN Reference

width: string

Property Value

string

Inherited Property Details

accessKey

The HTMLElement.accessKey property sets the keystroke which a user can press to jump to a given element.

MDN Reference

accessKey: string

Property Value

string

Inherited From HTMLElement.accessKey

accessKeyLabel

The HTMLElement.accessKeyLabel read-only property returns a string containing the element's browser-assigned access key (if any); otherwise it returns an empty string.

MDN Reference

accessKeyLabel: string

Property Value

string

Inherited From HTMLElement.accessKeyLabel

ariaActiveDescendantElement

MDN Reference

ariaActiveDescendantElement: Element | null

Property Value

Element | null

Inherited From HTMLElement.ariaActiveDescendantElement

ariaAtomic

MDN Reference

ariaAtomic: string | null

Property Value

string | null

Inherited From HTMLElement.ariaAtomic

ariaAutoComplete

MDN Reference

ariaAutoComplete: string | null

Property Value

string | null

Inherited From HTMLElement.ariaAutoComplete

ariaBrailleLabel

MDN Reference

ariaBrailleLabel: string | null

Property Value

string | null

Inherited From HTMLElement.ariaBrailleLabel

ariaBrailleRoleDescription

MDN Reference

ariaBrailleRoleDescription: string | null

Property Value

string | null

Inherited From HTMLElement.ariaBrailleRoleDescription

ariaBusy

MDN Reference

ariaBusy: string | null

Property Value

string | null

Inherited From HTMLElement.ariaBusy

ariaChecked

MDN Reference

ariaChecked: string | null

Property Value

string | null

Inherited From HTMLElement.ariaChecked

ariaColCount

MDN Reference

ariaColCount: string | null

Property Value

string | null

Inherited From HTMLElement.ariaColCount

ariaColIndex

MDN Reference

ariaColIndex: string | null

Property Value

string | null

Inherited From HTMLElement.ariaColIndex

ariaColIndexText

MDN Reference

ariaColIndexText: string | null

Property Value

string | null

Inherited From HTMLElement.ariaColIndexText

ariaColSpan

MDN Reference

ariaColSpan: string | null

Property Value

string | null

Inherited From HTMLElement.ariaColSpan

ariaControlsElements

MDN Reference

ariaControlsElements: (readonly Element[]) | null

Property Value

(readonly Element[]) | null

Inherited From HTMLElement.ariaControlsElements

ariaCurrent

MDN Reference

ariaCurrent: string | null

Property Value

string | null

Inherited From HTMLElement.ariaCurrent

ariaDescribedByElements

MDN Reference

ariaDescribedByElements: (readonly Element[]) | null

Property Value

(readonly Element[]) | null

Inherited From HTMLElement.ariaDescribedByElements

ariaDescription

MDN Reference

ariaDescription: string | null

Property Value

string | null

Inherited From HTMLElement.ariaDescription

ariaDetailsElements

MDN Reference

ariaDetailsElements: (readonly Element[]) | null

Property Value

(readonly Element[]) | null

Inherited From HTMLElement.ariaDetailsElements

ariaDisabled

MDN Reference

ariaDisabled: string | null

Property Value

string | null

Inherited From HTMLElement.ariaDisabled

ariaErrorMessageElements

MDN Reference

ariaErrorMessageElements: (readonly Element[]) | null

Property Value

(readonly Element[]) | null

Inherited From HTMLElement.ariaErrorMessageElements

ariaExpanded

MDN Reference

ariaExpanded: string | null

Property Value

string | null

Inherited From HTMLElement.ariaExpanded

ariaFlowToElements

MDN Reference

ariaFlowToElements: (readonly Element[]) | null

Property Value

(readonly Element[]) | null

Inherited From HTMLElement.ariaFlowToElements

ariaHasPopup

MDN Reference

ariaHasPopup: string | null

Property Value

string | null

Inherited From HTMLElement.ariaHasPopup

ariaHidden

MDN Reference

ariaHidden: string | null

Property Value

string | null

Inherited From HTMLElement.ariaHidden

ariaInvalid

MDN Reference

ariaInvalid: string | null

Property Value

string | null

Inherited From HTMLElement.ariaInvalid

ariaKeyShortcuts

MDN Reference

ariaKeyShortcuts: string | null

Property Value

string | null

Inherited From HTMLElement.ariaKeyShortcuts

ariaLabel

MDN Reference

ariaLabel: string | null

Property Value

string | null

Inherited From HTMLElement.ariaLabel

ariaLabelledByElements

MDN Reference

ariaLabelledByElements: (readonly Element[]) | null

Property Value

(readonly Element[]) | null

Inherited From HTMLElement.ariaLabelledByElements

ariaLevel

MDN Reference

ariaLevel: string | null

Property Value

string | null

Inherited From HTMLElement.ariaLevel

ariaLive

MDN Reference

ariaLive: string | null

Property Value

string | null

Inherited From HTMLElement.ariaLive

ariaModal

MDN Reference

ariaModal: string | null

Property Value

string | null

Inherited From HTMLElement.ariaModal

ariaMultiLine

MDN Reference

ariaMultiLine: string | null

Property Value

string | null

Inherited From HTMLElement.ariaMultiLine

ariaMultiSelectable

MDN Reference

ariaMultiSelectable: string | null

Property Value

string | null

Inherited From HTMLElement.ariaMultiSelectable

ariaOrientation

MDN Reference

ariaOrientation: string | null

Property Value

string | null

Inherited From HTMLElement.ariaOrientation

ariaOwnsElements

MDN Reference

ariaOwnsElements: (readonly Element[]) | null

Property Value

(readonly Element[]) | null

Inherited From HTMLElement.ariaOwnsElements

ariaPlaceholder

MDN Reference

ariaPlaceholder: string | null

Property Value

string | null

Inherited From HTMLElement.ariaPlaceholder

ariaPosInSet

MDN Reference

ariaPosInSet: string | null

Property Value

string | null

Inherited From HTMLElement.ariaPosInSet

ariaPressed

MDN Reference

ariaPressed: string | null

Property Value

string | null

Inherited From HTMLElement.ariaPressed

ariaReadOnly

MDN Reference

ariaReadOnly: string | null

Property Value

string | null

Inherited From HTMLElement.ariaReadOnly

ariaRelevant

MDN Reference

ariaRelevant: string | null

Property Value

string | null

Inherited From HTMLElement.ariaRelevant

ariaRequired

MDN Reference

ariaRequired: string | null

Property Value

string | null

Inherited From HTMLElement.ariaRequired

ariaRoleDescription

MDN Reference

ariaRoleDescription: string | null

Property Value

string | null

Inherited From HTMLElement.ariaRoleDescription

ariaRowCount

MDN Reference

ariaRowCount: string | null

Property Value

string | null

Inherited From HTMLElement.ariaRowCount

ariaRowIndex

MDN Reference

ariaRowIndex: string | null

Property Value

string | null

Inherited From HTMLElement.ariaRowIndex

ariaRowIndexText

MDN Reference

ariaRowIndexText: string | null

Property Value

string | null

Inherited From HTMLElement.ariaRowIndexText

ariaRowSpan

MDN Reference

ariaRowSpan: string | null

Property Value

string | null

Inherited From HTMLElement.ariaRowSpan

ariaSelected

MDN Reference

ariaSelected: string | null

Property Value

string | null

Inherited From HTMLElement.ariaSelected

ariaSetSize

MDN Reference

ariaSetSize: string | null

Property Value

string | null

Inherited From HTMLElement.ariaSetSize

ariaSort

MDN Reference

ariaSort: string | null

Property Value

string | null

Inherited From HTMLElement.ariaSort

ariaValueMax

MDN Reference

ariaValueMax: string | null

Property Value

string | null

Inherited From HTMLElement.ariaValueMax

ariaValueMin

MDN Reference

ariaValueMin: string | null

Property Value

string | null

Inherited From HTMLElement.ariaValueMin

ariaValueNow

MDN Reference

ariaValueNow: string | null

Property Value

string | null

Inherited From HTMLElement.ariaValueNow

ariaValueText

MDN Reference

ariaValueText: string | null

Property Value

string | null

Inherited From HTMLElement.ariaValueText

assignedSlot

MDN Reference

assignedSlot: HTMLSlotElement | null

Property Value

HTMLSlotElement | null

Inherited From HTMLElement.assignedSlot

attributes

The Element.attributes property returns a live collection of all attribute nodes registered to the specified node.

MDN Reference

attributes: NamedNodeMap

Property Value

NamedNodeMap

Inherited From HTMLElement.attributes

attributeStyleMap

MDN Reference

attributeStyleMap: StylePropertyMap

Property Value

StylePropertyMap

Inherited From HTMLElement.attributeStyleMap

ATTRIBUTE_NODE

ATTRIBUTE_NODE: 2

Property Value

2

Inherited From HTMLElement.ATTRIBUTE_NODE

autocapitalize

The autocapitalize property of the HTMLElement interface represents the element's capitalization behavior for user input.

MDN Reference

autocapitalize: string

Property Value

string

Inherited From HTMLElement.autocapitalize

autocorrect

The autocorrect property of the HTMLElement interface controls whether or not autocorrection of editable text is enabled for spelling and/or punctuation errors.

MDN Reference

autocorrect: boolean

Property Value

boolean

Inherited From HTMLElement.autocorrect

autofocus

MDN Reference

autofocus: boolean

Property Value

boolean

Inherited From HTMLElement.autofocus

baseURI

The read-only baseURI property of the Node interface returns the absolute base URL of the document containing the node.

MDN Reference

baseURI: string

Property Value

string

Inherited From HTMLElement.baseURI

CDATA_SECTION_NODE

node is a CDATASection node.

CDATA_SECTION_NODE: 4

Property Value

4

Inherited From HTMLElement.CDATA_SECTION_NODE

childElementCount

MDN Reference

childElementCount: number

Property Value

number

Inherited From HTMLElement.childElementCount

childNodes

The read-only childNodes property of the Node interface returns a live the first child node is assigned index 0.

MDN Reference

childNodes: NodeListOf<ChildNode>

Property Value

NodeListOf<ChildNode>

Inherited From HTMLElement.childNodes

children

Returns the child elements.

MDN Reference

children: HTMLCollection

Property Value

HTMLCollection

Inherited From HTMLElement.children

className

The className property of the of the specified element.

MDN Reference

className: string

Property Value

string

Inherited From HTMLElement.className

clientHeight

The clientHeight read-only property of the Element interface is zero for elements with no CSS or inline layout boxes; otherwise, it's the inner height of an element in pixels.

MDN Reference

clientHeight: number

Property Value

number

Inherited From HTMLElement.clientHeight

clientLeft

The clientLeft read-only property of the Element interface returns the width of the left border of an element in pixels.

MDN Reference

clientLeft: number

Property Value

number

Inherited From HTMLElement.clientLeft

clientTop

The clientTop read-only property of the Element interface returns the width of the top border of an element in pixels.

MDN Reference

clientTop: number

Property Value

number

Inherited From HTMLElement.clientTop

clientWidth

The clientWidth read-only property of the Element interface is zero for inline elements and elements with no CSS; otherwise, it's the inner width of an element in pixels.

MDN Reference

clientWidth: number

Property Value

number

Inherited From HTMLElement.clientWidth

COMMENT_NODE

node is a Comment node.

COMMENT_NODE: 8

Property Value

8

Inherited From HTMLElement.COMMENT_NODE

contentEditable

MDN Reference

contentEditable: string

Property Value

string

Inherited From HTMLElement.contentEditable

currentCSSZoom

The currentCSSZoom read-only property of the Element interface provides the 'effective' CSS zoom of an element, taking into account the zoom applied to the element and all its parent elements.

MDN Reference

currentCSSZoom: number

Property Value

number

Inherited From HTMLElement.currentCSSZoom

dataset

MDN Reference

dataset: DOMStringMap

Property Value

DOMStringMap

Inherited From HTMLElement.dataset

dir

The HTMLElement.dir property indicates the text writing directionality of the content of the current element.

MDN Reference

dir: string

Property Value

string

Inherited From HTMLElement.dir

DOCUMENT_FRAGMENT_NODE

node is a DocumentFragment node.

DOCUMENT_FRAGMENT_NODE: 11

Property Value

11

Inherited From HTMLElement.DOCUMENT_FRAGMENT_NODE

DOCUMENT_NODE

node is a document.

DOCUMENT_NODE: 9

Property Value

9

Inherited From HTMLElement.DOCUMENT_NODE

DOCUMENT_POSITION_CONTAINED_BY

Set when other is a descendant of node.

DOCUMENT_POSITION_CONTAINED_BY: 16

Property Value

16

Inherited From HTMLElement.DOCUMENT_POSITION_CONTAINED_BY

DOCUMENT_POSITION_CONTAINS

Set when other is an ancestor of node.

DOCUMENT_POSITION_CONTAINS: 8

Property Value

8

Inherited From HTMLElement.DOCUMENT_POSITION_CONTAINS

DOCUMENT_POSITION_DISCONNECTED

Set when node and other are not in the same tree.

DOCUMENT_POSITION_DISCONNECTED: 1

Property Value

1

Inherited From HTMLElement.DOCUMENT_POSITION_DISCONNECTED

DOCUMENT_POSITION_FOLLOWING

Set when other is following node.

DOCUMENT_POSITION_FOLLOWING: 4

Property Value

4

Inherited From HTMLElement.DOCUMENT_POSITION_FOLLOWING

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32

Property Value

32

Inherited From HTMLElement.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC

DOCUMENT_POSITION_PRECEDING

Set when other is preceding node.

DOCUMENT_POSITION_PRECEDING: 2

Property Value

2

Inherited From HTMLElement.DOCUMENT_POSITION_PRECEDING

DOCUMENT_TYPE_NODE

node is a doctype.

DOCUMENT_TYPE_NODE: 10

Property Value

10

Inherited From HTMLElement.DOCUMENT_TYPE_NODE

draggable

The draggable property of the HTMLElement interface gets and sets a Boolean primitive indicating if the element is draggable.

MDN Reference

draggable: boolean

Property Value

boolean

Inherited From HTMLElement.draggable

ELEMENT_NODE

node is an element.

ELEMENT_NODE: 1

Property Value

1

Inherited From HTMLElement.ELEMENT_NODE

enterKeyHint

MDN Reference

enterKeyHint: string

Property Value

string

Inherited From HTMLElement.enterKeyHint

ENTITY_NODE

ENTITY_NODE: 6

Property Value

6

Inherited From HTMLElement.ENTITY_NODE

ENTITY_REFERENCE_NODE

ENTITY_REFERENCE_NODE: 5

Property Value

5

Inherited From HTMLElement.ENTITY_REFERENCE_NODE

firstChild

The read-only firstChild property of the Node interface returns the node's first child in the tree, or null if the node has no children.

MDN Reference

firstChild: ChildNode | null

Property Value

ChildNode | null

Inherited From HTMLElement.firstChild

firstElementChild

Returns the first child that is an element, and null otherwise.

MDN Reference

firstElementChild: Element | null

Property Value

Element | null

Inherited From HTMLElement.firstElementChild

hidden

The HTMLElement property hidden reflects the value of the element's hidden attribute.

MDN Reference

hidden: boolean

Property Value

boolean

Inherited From HTMLElement.hidden

id

The id property of the Element interface represents the element's identifier, reflecting the id global attribute.

MDN Reference

id: string

Property Value

string

Inherited From HTMLElement.id

inert

The HTMLElement property inert reflects the value of the element's inert attribute.

MDN Reference

inert: boolean

Property Value

boolean

Inherited From HTMLElement.inert

innerHTML

The innerHTML property of the Element interface gets or sets the HTML or XML markup contained within the element.

MDN Reference

innerHTML: string

Property Value

string

Inherited From HTMLElement.innerHTML

innerText

The innerText property of the HTMLElement interface represents the rendered text content of a node and its descendants.

MDN Reference

innerText: string

Property Value

string

Inherited From HTMLElement.innerText

inputMode

MDN Reference

inputMode: string

Property Value

string

Inherited From HTMLElement.inputMode

isConnected

The read-only isConnected property of the Node interface returns a boolean indicating whether the node is connected (directly or indirectly) to a Document object.

MDN Reference

isConnected: boolean

Property Value

boolean

Inherited From HTMLElement.isConnected

isContentEditable

MDN Reference

isContentEditable: boolean

Property Value

boolean

Inherited From HTMLElement.isContentEditable

lang

The lang property of the HTMLElement interface indicates the base language of an element's attribute values and text content, in the form of a MISSING: RFC(5646, 'BCP 47 language identifier tag')].

MDN Reference

lang: string

Property Value

string

Inherited From HTMLElement.lang

lastChild

The read-only lastChild property of the Node interface returns the last child of the node, or null if there are no child nodes.

MDN Reference

lastChild: ChildNode | null

Property Value

ChildNode | null

Inherited From HTMLElement.lastChild

lastElementChild

Returns the last child that is an element, and null otherwise.

MDN Reference

lastElementChild: Element | null

Property Value

Element | null

Inherited From HTMLElement.lastElementChild

localName

The Element.localName read-only property returns the local part of the qualified name of an element.

MDN Reference

localName: string

Property Value

string

Inherited From HTMLElement.localName

namespaceURI

The Element.namespaceURI read-only property returns the namespace URI of the element, or null if the element is not in a namespace.

MDN Reference

namespaceURI: string | null

Property Value

string | null

Inherited From HTMLElement.namespaceURI

nextElementSibling

Returns the first following sibling that is an element, and null otherwise.

MDN Reference

nextElementSibling: Element | null

Property Value

Element | null

Inherited From HTMLElement.nextElementSibling

nextSibling

The read-only nextSibling property of the Node interface returns the node immediately following the specified one in their parent's Node.childNodes, or returns null if the specified node is the last child in the parent element.

MDN Reference

nextSibling: ChildNode | null

Property Value

ChildNode | null

Inherited From HTMLElement.nextSibling

nodeName

The read-only nodeName property of Node returns the name of the current node as a string.

MDN Reference

nodeName: string

Property Value

string

Inherited From HTMLElement.nodeName

nodeType

The read-only nodeType property of a Node interface is an integer that identifies what the node is.

MDN Reference

nodeType: number

Property Value

number

Inherited From HTMLElement.nodeType

nodeValue

The nodeValue property of the Node interface returns or sets the value of the current node.

MDN Reference

nodeValue: string | null

Property Value

string | null

Inherited From HTMLElement.nodeValue

nonce

MDN Reference

nonce?: string

Property Value

string

Inherited From HTMLElement.nonce

NOTATION_NODE

NOTATION_NODE: 12

Property Value

12

Inherited From HTMLElement.NOTATION_NODE

offsetHeight

The offsetHeight read-only property of the HTMLElement interface returns the height of an element, including vertical padding and borders, as an integer.

MDN Reference

offsetHeight: number

Property Value

number

Inherited From HTMLElement.offsetHeight

offsetLeft

The offsetLeft read-only property of the HTMLElement interface returns the number of pixels that the upper left corner of the current element is offset to the left within the HTMLElement.offsetParent node.

MDN Reference

offsetLeft: number

Property Value

number

Inherited From HTMLElement.offsetLeft

offsetParent

The HTMLElement.offsetParent read-only property returns a reference to the element which is the closest (nearest in the containment hierarchy) positioned ancestor element.

MDN Reference

offsetParent: Element | null

Property Value

Element | null

Inherited From HTMLElement.offsetParent

offsetTop

The offsetTop read-only property of the HTMLElement interface returns the distance from the outer border of the current element (including its margin) to the top padding edge of the HTMLelement.offsetParent, the closest positioned ancestor element.

MDN Reference

offsetTop: number

Property Value

number

Inherited From HTMLElement.offsetTop

offsetWidth

The offsetWidth read-only property of the HTMLElement interface returns the layout width of an element as an integer.

MDN Reference

offsetWidth: number

Property Value

number

Inherited From HTMLElement.offsetWidth

onabort

MDN Reference

onabort: (this: GlobalEventHandlers, ev: UIEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: UIEvent) => any | null

Inherited From HTMLElement.onabort

onanimationcancel

MDN Reference

onanimationcancel: (this: GlobalEventHandlers, ev: AnimationEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: AnimationEvent) => any | null

Inherited From HTMLElement.onanimationcancel

onanimationend

MDN Reference

onanimationend: (this: GlobalEventHandlers, ev: AnimationEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: AnimationEvent) => any | null

Inherited From HTMLElement.onanimationend

onanimationiteration

MDN Reference

onanimationiteration: (this: GlobalEventHandlers, ev: AnimationEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: AnimationEvent) => any | null

Inherited From HTMLElement.onanimationiteration

onanimationstart

MDN Reference

onanimationstart: (this: GlobalEventHandlers, ev: AnimationEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: AnimationEvent) => any | null

Inherited From HTMLElement.onanimationstart

onauxclick

MDN Reference

onauxclick: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From HTMLElement.onauxclick

onbeforeinput

MDN Reference

onbeforeinput: (this: GlobalEventHandlers, ev: InputEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: InputEvent) => any | null

Inherited From HTMLElement.onbeforeinput

onbeforematch

MDN Reference

onbeforematch: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onbeforematch

onbeforetoggle

MDN Reference

onbeforetoggle: (this: GlobalEventHandlers, ev: ToggleEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: ToggleEvent) => any | null

Inherited From HTMLElement.onbeforetoggle

onblur

MDN Reference

onblur: (this: GlobalEventHandlers, ev: FocusEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: FocusEvent) => any | null

Inherited From HTMLElement.onblur

oncancel

MDN Reference

oncancel: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.oncancel

oncanplay

MDN Reference

oncanplay: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.oncanplay

oncanplaythrough

MDN Reference

oncanplaythrough: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.oncanplaythrough

onchange

MDN Reference

onchange: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onchange

onclick

MDN Reference

onclick: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From HTMLElement.onclick

onclose

MDN Reference

onclose: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onclose

oncontextlost

MDN Reference

oncontextlost: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.oncontextlost

oncontextmenu

MDN Reference

oncontextmenu: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From HTMLElement.oncontextmenu

oncontextrestored

MDN Reference

oncontextrestored: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.oncontextrestored

oncopy

MDN Reference

oncopy: (this: GlobalEventHandlers, ev: ClipboardEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: ClipboardEvent) => any | null

Inherited From HTMLElement.oncopy

oncuechange

MDN Reference

oncuechange: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.oncuechange

oncut

MDN Reference

oncut: (this: GlobalEventHandlers, ev: ClipboardEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: ClipboardEvent) => any | null

Inherited From HTMLElement.oncut

ondblclick

MDN Reference

ondblclick: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From HTMLElement.ondblclick

ondrag

MDN Reference

ondrag: (this: GlobalEventHandlers, ev: DragEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: DragEvent) => any | null

Inherited From HTMLElement.ondrag

ondragend

MDN Reference

ondragend: (this: GlobalEventHandlers, ev: DragEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: DragEvent) => any | null

Inherited From HTMLElement.ondragend

ondragenter

MDN Reference

ondragenter: (this: GlobalEventHandlers, ev: DragEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: DragEvent) => any | null

Inherited From HTMLElement.ondragenter

ondragleave

MDN Reference

ondragleave: (this: GlobalEventHandlers, ev: DragEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: DragEvent) => any | null

Inherited From HTMLElement.ondragleave

ondragover

MDN Reference

ondragover: (this: GlobalEventHandlers, ev: DragEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: DragEvent) => any | null

Inherited From HTMLElement.ondragover

ondragstart

MDN Reference

ondragstart: (this: GlobalEventHandlers, ev: DragEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: DragEvent) => any | null

Inherited From HTMLElement.ondragstart

ondrop

MDN Reference

ondrop: (this: GlobalEventHandlers, ev: DragEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: DragEvent) => any | null

Inherited From HTMLElement.ondrop

ondurationchange

MDN Reference

ondurationchange: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.ondurationchange

onemptied

MDN Reference

onemptied: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onemptied

onended

MDN Reference

onended: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onended

onerror

MDN Reference

onerror: OnErrorEventHandler

Property Value

OnErrorEventHandler

Inherited From HTMLElement.onerror

onfocus

MDN Reference

onfocus: (this: GlobalEventHandlers, ev: FocusEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: FocusEvent) => any | null

Inherited From HTMLElement.onfocus

onformdata

MDN Reference

onformdata: (this: GlobalEventHandlers, ev: FormDataEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: FormDataEvent) => any | null

Inherited From HTMLElement.onformdata

onfullscreenchange

MDN Reference

onfullscreenchange: (this: Element, ev: Event) => any | null

Property Value

(this: Element, ev: Event) => any | null

Inherited From HTMLElement.onfullscreenchange

onfullscreenerror

MDN Reference

onfullscreenerror: (this: Element, ev: Event) => any | null

Property Value

(this: Element, ev: Event) => any | null

Inherited From HTMLElement.onfullscreenerror

ongotpointercapture

MDN Reference

ongotpointercapture: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From HTMLElement.ongotpointercapture

oninput

MDN Reference

oninput: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.oninput

oninvalid

MDN Reference

oninvalid: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.oninvalid

onkeydown

MDN Reference

onkeydown: (this: GlobalEventHandlers, ev: KeyboardEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: KeyboardEvent) => any | null

Inherited From HTMLElement.onkeydown

onkeypress

Warning

This API is now deprecated.

MDN Reference

onkeypress: (this: GlobalEventHandlers, ev: KeyboardEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: KeyboardEvent) => any | null

Inherited From HTMLElement.onkeypress

onkeyup

MDN Reference

onkeyup: (this: GlobalEventHandlers, ev: KeyboardEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: KeyboardEvent) => any | null

Inherited From HTMLElement.onkeyup

onload

MDN Reference

onload: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onload

onloadeddata

MDN Reference

onloadeddata: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onloadeddata

onloadedmetadata

MDN Reference

onloadedmetadata: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onloadedmetadata

onloadstart

MDN Reference

onloadstart: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onloadstart

onlostpointercapture

MDN Reference

onlostpointercapture: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From HTMLElement.onlostpointercapture

onmousedown

MDN Reference

onmousedown: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From HTMLElement.onmousedown

onmouseenter

MDN Reference

onmouseenter: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From HTMLElement.onmouseenter

onmouseleave

MDN Reference

onmouseleave: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From HTMLElement.onmouseleave

onmousemove

MDN Reference

onmousemove: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From HTMLElement.onmousemove

onmouseout

MDN Reference

onmouseout: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From HTMLElement.onmouseout

onmouseover

MDN Reference

onmouseover: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From HTMLElement.onmouseover

onmouseup

MDN Reference

onmouseup: (this: GlobalEventHandlers, ev: MouseEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From HTMLElement.onmouseup

onpaste

MDN Reference

onpaste: (this: GlobalEventHandlers, ev: ClipboardEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: ClipboardEvent) => any | null

Inherited From HTMLElement.onpaste

onpause

MDN Reference

onpause: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onpause

onplay

MDN Reference

onplay: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onplay

onplaying

MDN Reference

onplaying: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onplaying

onpointercancel

MDN Reference

onpointercancel: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From HTMLElement.onpointercancel

onpointerdown

MDN Reference

onpointerdown: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From HTMLElement.onpointerdown

onpointerenter

MDN Reference

onpointerenter: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From HTMLElement.onpointerenter

onpointerleave

MDN Reference

onpointerleave: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From HTMLElement.onpointerleave

onpointermove

MDN Reference

onpointermove: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From HTMLElement.onpointermove

onpointerout

MDN Reference

onpointerout: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From HTMLElement.onpointerout

onpointerover

MDN Reference

onpointerover: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From HTMLElement.onpointerover

onpointerrawupdate

Available only in secure contexts.

MDN Reference

onpointerrawupdate: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onpointerrawupdate

onpointerup

MDN Reference

onpointerup: (this: GlobalEventHandlers, ev: PointerEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From HTMLElement.onpointerup

onprogress

MDN Reference

onprogress: (this: GlobalEventHandlers, ev: ProgressEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: ProgressEvent) => any | null

Inherited From HTMLElement.onprogress

onratechange

MDN Reference

onratechange: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onratechange

onreset

MDN Reference

onreset: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onreset

onresize

MDN Reference

onresize: (this: GlobalEventHandlers, ev: UIEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: UIEvent) => any | null

Inherited From HTMLElement.onresize

onscroll

MDN Reference

onscroll: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onscroll

onscrollend

MDN Reference

onscrollend: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onscrollend

onsecuritypolicyviolation

MDN Reference

onsecuritypolicyviolation: (this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any | null

Inherited From HTMLElement.onsecuritypolicyviolation

onseeked

MDN Reference

onseeked: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onseeked

onseeking

MDN Reference

onseeking: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onseeking

onselect

MDN Reference

onselect: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onselect

onselectionchange

MDN Reference

onselectionchange: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onselectionchange

onselectstart

MDN Reference

onselectstart: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onselectstart

onslotchange

MDN Reference

onslotchange: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onslotchange

onstalled

MDN Reference

onstalled: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onstalled

onsubmit

MDN Reference

onsubmit: (this: GlobalEventHandlers, ev: SubmitEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: SubmitEvent) => any | null

Inherited From HTMLElement.onsubmit

onsuspend

MDN Reference

onsuspend: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onsuspend

ontimeupdate

MDN Reference

ontimeupdate: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.ontimeupdate

ontoggle

MDN Reference

ontoggle: (this: GlobalEventHandlers, ev: ToggleEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: ToggleEvent) => any | null

Inherited From HTMLElement.ontoggle

ontouchcancel

MDN Reference

ontouchcancel?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: TouchEvent) => any | null

Inherited From HTMLElement.ontouchcancel

ontouchend

MDN Reference

ontouchend?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: TouchEvent) => any | null

Inherited From HTMLElement.ontouchend

ontouchmove

MDN Reference

ontouchmove?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: TouchEvent) => any | null

Inherited From HTMLElement.ontouchmove

ontouchstart

MDN Reference

ontouchstart?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: TouchEvent) => any | null

Inherited From HTMLElement.ontouchstart

ontransitioncancel

MDN Reference

ontransitioncancel: (this: GlobalEventHandlers, ev: TransitionEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: TransitionEvent) => any | null

Inherited From HTMLElement.ontransitioncancel

ontransitionend

MDN Reference

ontransitionend: (this: GlobalEventHandlers, ev: TransitionEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: TransitionEvent) => any | null

Inherited From HTMLElement.ontransitionend

ontransitionrun

MDN Reference

ontransitionrun: (this: GlobalEventHandlers, ev: TransitionEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: TransitionEvent) => any | null

Inherited From HTMLElement.ontransitionrun

ontransitionstart

MDN Reference

ontransitionstart: (this: GlobalEventHandlers, ev: TransitionEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: TransitionEvent) => any | null

Inherited From HTMLElement.ontransitionstart

onvolumechange

MDN Reference

onvolumechange: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onvolumechange

onwaiting

MDN Reference

onwaiting: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onwaiting

onwebkitanimationend

Warning

This API is now deprecated.

This is a legacy alias of onanimationend.

MDN Reference

onwebkitanimationend: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onwebkitanimationend

onwebkitanimationiteration

Warning

This API is now deprecated.

This is a legacy alias of onanimationiteration.

MDN Reference

onwebkitanimationiteration: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onwebkitanimationiteration

onwebkitanimationstart

Warning

This API is now deprecated.

This is a legacy alias of onanimationstart.

MDN Reference

onwebkitanimationstart: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onwebkitanimationstart

onwebkittransitionend

Warning

This API is now deprecated.

This is a legacy alias of ontransitionend.

MDN Reference

onwebkittransitionend: (this: GlobalEventHandlers, ev: Event) => any | null

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From HTMLElement.onwebkittransitionend

onwheel

MDN Reference

onwheel: (this: GlobalEventHandlers, ev: WheelEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: WheelEvent) => any | null

Inherited From HTMLElement.onwheel

outerHTML

The outerHTML attribute of the Element DOM interface gets the serialized HTML fragment describing the element including its descendants.

MDN Reference

outerHTML: string

Property Value

string

Inherited From HTMLElement.outerHTML

outerText

The outerText property of the HTMLElement interface returns the same value as HTMLElement.innerText.

MDN Reference

outerText: string

Property Value

string

Inherited From HTMLElement.outerText

ownerDocument

The read-only ownerDocument property of the Node interface returns the top-level document object of the node.

MDN Reference

ownerDocument: Document

Property Value

Inherited From HTMLElement.ownerDocument

parentElement

The read-only parentElement property of Node interface returns the DOM node's parent Element, or null if the node either has no parent, or its parent isn't a DOM Element.

MDN Reference

parentElement: HTMLElement | null

Property Value

HTMLElement | null

Inherited From HTMLElement.parentElement

parentNode

The read-only parentNode property of the Node interface returns the parent of the specified node in the DOM tree.

MDN Reference

parentNode: ParentNode | null

Property Value

ParentNode | null

Inherited From HTMLElement.parentNode

popover

The popover property of the HTMLElement interface gets and sets an element's popover state via JavaScript ('auto', 'hint', or 'manual'), and can be used for feature detection.

MDN Reference

popover: string | null

Property Value

string | null

Inherited From HTMLElement.popover

prefix

The Element.prefix read-only property returns the namespace prefix of the specified element, or null if no prefix is specified.

MDN Reference

prefix: string | null

Property Value

string | null

Inherited From HTMLElement.prefix

previousElementSibling

Returns the first preceding sibling that is an element, and null otherwise.

MDN Reference

previousElementSibling: Element | null

Property Value

Element | null

Inherited From HTMLElement.previousElementSibling

previousSibling

The read-only previousSibling property of the Node interface returns the node immediately preceding the specified one in its parent's or null if the specified node is the first in that list.

MDN Reference

previousSibling: ChildNode | null

Property Value

ChildNode | null

Inherited From HTMLElement.previousSibling

PROCESSING_INSTRUCTION_NODE

node is a ProcessingInstruction node.

PROCESSING_INSTRUCTION_NODE: 7

Property Value

7

Inherited From HTMLElement.PROCESSING_INSTRUCTION_NODE

role

MDN Reference

role: string | null

Property Value

string | null

Inherited From HTMLElement.role

scrollHeight

The scrollHeight read-only property of the Element interface is a measurement of the height of an element's content, including content not visible on the screen due to overflow.

MDN Reference

scrollHeight: number

Property Value

number

Inherited From HTMLElement.scrollHeight

scrollLeft

The scrollLeft property of the Element interface gets or sets the number of pixels by which an element's content is scrolled from its left edge.

MDN Reference

scrollLeft: number

Property Value

number

Inherited From HTMLElement.scrollLeft

scrollTop

The scrollTop property of the Element interface gets or sets the number of pixels by which an element's content is scrolled from its top edge.

MDN Reference

scrollTop: number

Property Value

number

Inherited From HTMLElement.scrollTop

scrollWidth

The scrollWidth read-only property of the Element interface is a measurement of the width of an element's content, including content not visible on the screen due to overflow.

MDN Reference

scrollWidth: number

Property Value

number

Inherited From HTMLElement.scrollWidth

shadowRoot

The Element.shadowRoot read-only property represents the shadow root hosted by the element.

MDN Reference

shadowRoot: ShadowRoot | null

Property Value

ShadowRoot | null

Inherited From HTMLElement.shadowRoot

slot

The slot property of the Element interface returns the name of the shadow DOM slot the element is inserted in.

MDN Reference

slot: string

Property Value

string

Inherited From HTMLElement.slot

spellcheck

The spellcheck property of the HTMLElement interface represents a boolean value that controls the spell-checking hint.

MDN Reference

spellcheck: boolean

Property Value

boolean

Inherited From HTMLElement.spellcheck

tabIndex

MDN Reference

tabIndex: number

Property Value

number

Inherited From HTMLElement.tabIndex

tagName

The tagName read-only property of the Element interface returns the tag name of the element on which it's called.

MDN Reference

tagName: string

Property Value

string

Inherited From HTMLElement.tagName

TEXT_NODE

node is a Text node.

TEXT_NODE: 3

Property Value

3

Inherited From HTMLElement.TEXT_NODE

title

The HTMLElement.title property represents the title of the element: the text usually displayed in a 'tooltip' popup when the mouse is over the node.

MDN Reference

title: string

Property Value

string

Inherited From HTMLElement.title

translate

The translate property of the HTMLElement interface indicates whether an element's attribute values and the values of its Text node children are to be translated when the page is localized, or whether to leave them unchanged.

MDN Reference

translate: boolean

Property Value

boolean

Inherited From HTMLElement.translate

writingSuggestions

The writingSuggestions property of the HTMLElement interface is a string indicating if browser-provided writing suggestions should be enabled under the scope of the element or not.

MDN Reference

writingSuggestions: string

Property Value

string

Inherited From HTMLElement.writingSuggestions

Method Details

addEventListener(string, EventListenerOrEventListenerObject, boolean | AddEventListenerOptions)

function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions)

Parameters

type

string

listener

EventListenerOrEventListenerObject

options

boolean | AddEventListenerOptions

addEventListener<K>(K, (this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any, boolean | AddEventListenerOptions)

function addEventListener<K>(type: K, listener: (this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions)

Parameters

type

K

listener

(this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any

options

boolean | AddEventListenerOptions

getSVGDocument()

The getSVGDocument() method of the HTMLIFrameElement interface returns the Document object of the embedded SVG.

MDN Reference

function getSVGDocument(): Document | null

Returns

Document | null

removeEventListener(string, EventListenerOrEventListenerObject, boolean | EventListenerOptions)

function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions)

Parameters

type

string

listener

EventListenerOrEventListenerObject

options

boolean | EventListenerOptions

removeEventListener<K>(K, (this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any, boolean | EventListenerOptions)

function removeEventListener<K>(type: K, listener: (this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions)

Parameters

type

K

listener

(this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any

options

boolean | EventListenerOptions

Inherited Method Details

after((string | Node)[])

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.

MDN Reference

function after(nodes: (string | Node)[])

Parameters

nodes

(string | Node)[]

Inherited From HTMLElement.after

animate(Keyframe[] | PropertyIndexedKeyframes | null, number | KeyframeAnimationOptions)

MDN Reference

function animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation

Parameters

keyframes

Keyframe[] | PropertyIndexedKeyframes | null

options

number | KeyframeAnimationOptions

Returns

Animation

Inherited From HTMLElement.animate

append((string | Node)[])

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.

MDN Reference

function append(nodes: (string | Node)[])

Parameters

nodes

(string | Node)[]

Inherited From HTMLElement.append

appendChild<T>(T)

The appendChild() method of the Node interface adds a node to the end of the list of children of a specified parent node.

MDN Reference

function appendChild<T>(node: T): T

Parameters

node

T

Returns

T

Inherited From HTMLElement.appendChild

attachInternals()

The HTMLElement.attachInternals() method returns an ElementInternals object.

MDN Reference

function attachInternals(): ElementInternals

Returns

ElementInternals

Inherited From HTMLElement.attachInternals

attachShadow(ShadowRootInit)

The Element.attachShadow() method attaches a shadow DOM tree to the specified element and returns a reference to its ShadowRoot.

MDN Reference

function attachShadow(init: ShadowRootInit): ShadowRoot

Parameters

init

ShadowRootInit

Returns

ShadowRoot

Inherited From HTMLElement.attachShadow

before((string | Node)[])

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.

MDN Reference

function before(nodes: (string | Node)[])

Parameters

nodes

(string | Node)[]

Inherited From HTMLElement.before

blur()

MDN Reference

function blur()

Inherited From HTMLElement.blur

checkVisibility(CheckVisibilityOptions)

The checkVisibility() method of the Element interface checks whether the element is visible.

MDN Reference

function checkVisibility(options?: CheckVisibilityOptions): boolean

Parameters

options

CheckVisibilityOptions

Returns

boolean

Inherited From HTMLElement.checkVisibility

click()

The HTMLElement.click() method simulates a mouse click on an element.

MDN Reference

function click()

Inherited From HTMLElement.click

cloneNode(boolean)

The cloneNode() method of the Node interface returns a duplicate of the node on which this method was called.

MDN Reference

function cloneNode(subtree?: boolean): Node

Parameters

subtree

boolean

Returns

Node

Inherited From HTMLElement.cloneNode

closest<E>(string)

function closest<E>(selectors: string): E | null

Parameters

selectors

string

Returns

E | null

Inherited From HTMLElement.closest

closest<K>(K)

The closest() method of the Element interface traverses the element and its parents (heading toward the document root) until it finds a node that matches the specified CSS selector.

MDN Reference

function closest<K>(selector: K): HTMLElementTagNameMap[K] | null

Parameters

selector

K

Returns

HTMLElementTagNameMap[K] | null

Inherited From HTMLElement.closest

closest<K>(K)

function closest<K>(selector: K): SVGElementTagNameMap[K] | null

Parameters

selector

K

Returns

SVGElementTagNameMap[K] | null

Inherited From HTMLElement.closest

closest<K>(K)

function closest<K>(selector: K): MathMLElementTagNameMap[K] | null

Parameters

selector

K

Returns

MathMLElementTagNameMap[K] | null

Inherited From HTMLElement.closest

compareDocumentPosition(Node)

The compareDocumentPosition() method of the Node interface reports the position of its argument node relative to the node on which it is called.

MDN Reference

function compareDocumentPosition(other: Node): number

Parameters

other

Node

Returns

number

Inherited From HTMLElement.compareDocumentPosition

computedStyleMap()

The computedStyleMap() method of the Element interface returns a StylePropertyMapReadOnly interface which provides a read-only representation of a CSS declaration block that is an alternative to CSSStyleDeclaration.

MDN Reference

function computedStyleMap(): StylePropertyMapReadOnly

Returns

StylePropertyMapReadOnly

Inherited From HTMLElement.computedStyleMap

contains(Node | null)

The contains() method of the Node interface returns a boolean value indicating whether a node is a descendant of a given node, that is the node itself, one of its direct children (Node.childNodes), one of the children's direct children, and so on.

MDN Reference

function contains(other: Node | null): boolean

Parameters

other

Node | null

Returns

boolean

Inherited From HTMLElement.contains

dispatchEvent(Event)

The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.

MDN Reference

function dispatchEvent(event: Event): boolean

Parameters

event

Event

Returns

boolean

Inherited From HTMLElement.dispatchEvent

focus(FocusOptions)

MDN Reference

function focus(options?: FocusOptions)

Parameters

options

FocusOptions

Inherited From HTMLElement.focus

getAnimations(GetAnimationsOptions)

MDN Reference

function getAnimations(options?: GetAnimationsOptions): Animation[]

Parameters

options

GetAnimationsOptions

Returns

Animation[]

Inherited From HTMLElement.getAnimations

getAttribute(string)

The getAttribute() method of the element.

MDN Reference

function getAttribute(qualifiedName: string): string | null

Parameters

qualifiedName

string

Returns

string | null

Inherited From HTMLElement.getAttribute

getAttributeNames()

The getAttributeNames() method of the array.

MDN Reference

function getAttributeNames(): string[]

Returns

string[]

Inherited From HTMLElement.getAttributeNames

getAttributeNode(string)

Returns the specified attribute of the specified element, as an Attr node.

MDN Reference

function getAttributeNode(qualifiedName: string): Attr | null

Parameters

qualifiedName

string

Returns

Attr | null

Inherited From HTMLElement.getAttributeNode

getAttributeNodeNS(string | null, string)

The getAttributeNodeNS() method of the Element interface returns the namespaced Attr node of an element.

MDN Reference

function getAttributeNodeNS(namespace: string | null, localName: string): Attr | null

Parameters

namespace

string | null

localName

string

Returns

Attr | null

Inherited From HTMLElement.getAttributeNodeNS

getAttributeNS(string | null, string)

The getAttributeNS() method of the Element interface returns the string value of the attribute with the specified namespace and name.

MDN Reference

function getAttributeNS(namespace: string | null, localName: string): string | null

Parameters

namespace

string | null

localName

string

Returns

string | null

Inherited From HTMLElement.getAttributeNS

getBoundingClientRect()

The Element.getBoundingClientRect() method returns a position relative to the viewport.

MDN Reference

function getBoundingClientRect(): DOMRect

Returns

DOMRect

Inherited From HTMLElement.getBoundingClientRect

getClientRects()

The getClientRects() method of the Element interface returns a collection of DOMRect objects that indicate the bounding rectangles for each CSS border box in a client.

MDN Reference

function getClientRects(): DOMRectList

Returns

DOMRectList

Inherited From HTMLElement.getClientRects

getElementsByClassName(string)

The Element method getElementsByClassName() returns a live specified class name or names.

MDN Reference

function getElementsByClassName(classNames: string): HTMLCollectionOf<Element>

Parameters

classNames

string

Returns

HTMLCollectionOf<Element>

Inherited From HTMLElement.getElementsByClassName

getElementsByTagName(string)

function getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>

Parameters

qualifiedName

string

Returns

HTMLCollectionOf<Element>

Inherited From HTMLElement.getElementsByTagName

getElementsByTagName<K>(K)

The Element.getElementsByTagName() method returns a live All descendants of the specified element are searched, but not the element itself.

MDN Reference

function getElementsByTagName<K>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>

Parameters

qualifiedName

K

Returns

HTMLCollectionOf<HTMLElementTagNameMap[K]>

Inherited From HTMLElement.getElementsByTagName

getElementsByTagName<K>(K)

function getElementsByTagName<K>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>

Parameters

qualifiedName

K

Returns

HTMLCollectionOf<SVGElementTagNameMap[K]>

Inherited From HTMLElement.getElementsByTagName

getElementsByTagName<K>(K)

function getElementsByTagName<K>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>

Parameters

qualifiedName

K

Returns

HTMLCollectionOf<MathMLElementTagNameMap[K]>

Inherited From HTMLElement.getElementsByTagName

getElementsByTagName<K>(K)

Warning

This API is now deprecated.

function getElementsByTagName<K>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>

Parameters

qualifiedName

K

Returns

HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>

Inherited From HTMLElement.getElementsByTagName

getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML", string)

function getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>

Parameters

namespaceURI

"http://www.w3.org/1998/Math/MathML"

localName

string

Returns

HTMLCollectionOf<MathMLElement>

Inherited From HTMLElement.getElementsByTagNameNS

getElementsByTagNameNS("http://www.w3.org/1999/xhtml", string)

The Element.getElementsByTagNameNS() method returns a live HTMLCollection of elements with the given tag name belonging to the given namespace.

MDN Reference

function getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>

Parameters

namespaceURI

"http://www.w3.org/1999/xhtml"

localName

string

Returns

HTMLCollectionOf<HTMLElement>

Inherited From HTMLElement.getElementsByTagNameNS

getElementsByTagNameNS("http://www.w3.org/2000/svg", string)

function getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>

Parameters

namespaceURI

"http://www.w3.org/2000/svg"

localName

string

Returns

HTMLCollectionOf<SVGElement>

Inherited From HTMLElement.getElementsByTagNameNS

getElementsByTagNameNS(string | null, string)

function getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>

Parameters

namespace

string | null

localName

string

Returns

HTMLCollectionOf<Element>

Inherited From HTMLElement.getElementsByTagNameNS

getHTML(GetHTMLOptions)

The getHTML() method of the Element interface is used to serialize an element's DOM to an HTML string.

MDN Reference

function getHTML(options?: GetHTMLOptions): string

Parameters

options

GetHTMLOptions

Returns

string

Inherited From HTMLElement.getHTML

getRootNode(GetRootNodeOptions)

The getRootNode() method of the Node interface returns the context object's root, which optionally includes the shadow root if it is available.

MDN Reference

function getRootNode(options?: GetRootNodeOptions): Node

Parameters

options

GetRootNodeOptions

Returns

Node

Inherited From HTMLElement.getRootNode

hasAttribute(string)

The Element.hasAttribute() method returns a Boolean value indicating whether the specified element has the specified attribute or not.

MDN Reference

function hasAttribute(qualifiedName: string): boolean

Parameters

qualifiedName

string

Returns

boolean

Inherited From HTMLElement.hasAttribute

hasAttributeNS(string | null, string)

The hasAttributeNS() method of the Element interface returns a boolean value indicating whether the current element has the specified attribute with the specified namespace.

MDN Reference

function hasAttributeNS(namespace: string | null, localName: string): boolean

Parameters

namespace

string | null

localName

string

Returns

boolean

Inherited From HTMLElement.hasAttributeNS

hasAttributes()

The hasAttributes() method of the Element interface returns a boolean value indicating whether the current element has any attributes or not.

MDN Reference

function hasAttributes(): boolean

Returns

boolean

Inherited From HTMLElement.hasAttributes

hasChildNodes()

The hasChildNodes() method of the Node interface returns a boolean value indicating whether the given Node has child nodes or not.

MDN Reference

function hasChildNodes(): boolean

Returns

boolean

Inherited From HTMLElement.hasChildNodes

hasPointerCapture(number)

The hasPointerCapture() method of the pointer capture for the pointer identified by the given pointer ID.

MDN Reference

function hasPointerCapture(pointerId: number): boolean

Parameters

pointerId

number

Returns

boolean

Inherited From HTMLElement.hasPointerCapture

hidePopover()

The hidePopover() method of the HTMLElement interface hides a popover element (i.e., one that has a valid popover attribute) by removing it from the top layer and styling it with display: none.

MDN Reference

function hidePopover()

Inherited From HTMLElement.hidePopover

insertAdjacentElement(InsertPosition, Element)

The insertAdjacentElement() method of the relative to the element it is invoked upon.

MDN Reference

function insertAdjacentElement(where: InsertPosition, element: Element): Element | null

Parameters

where

InsertPosition

element

Element

Returns

Element | null

Inherited From HTMLElement.insertAdjacentElement

insertAdjacentHTML(InsertPosition, string)

The insertAdjacentHTML() method of the the resulting nodes into the DOM tree at a specified position.

MDN Reference

function insertAdjacentHTML(position: InsertPosition, string: string)

Parameters

position

InsertPosition

string

string

Inherited From HTMLElement.insertAdjacentHTML

insertAdjacentText(InsertPosition, string)

The insertAdjacentText() method of the Element interface, given a relative position and a string, inserts a new text node at the given position relative to the element it is called from.

MDN Reference

function insertAdjacentText(where: InsertPosition, data: string)

Parameters

where

InsertPosition

data

string

Inherited From HTMLElement.insertAdjacentText

insertBefore<T>(T, Node | null)

The insertBefore() method of the Node interface inserts a node before a reference node as a child of a specified parent node.

MDN Reference

function insertBefore<T>(node: T, child: Node | null): T

Parameters

node

T

child

Node | null

Returns

T

Inherited From HTMLElement.insertBefore

isDefaultNamespace(string | null)

The isDefaultNamespace() method of the Node interface accepts a namespace URI as an argument.

MDN Reference

function isDefaultNamespace(namespace: string | null): boolean

Parameters

namespace

string | null

Returns

boolean

Inherited From HTMLElement.isDefaultNamespace

isEqualNode(Node | null)

The isEqualNode() method of the Node interface tests whether two nodes are equal.

MDN Reference

function isEqualNode(otherNode: Node | null): boolean

Parameters

otherNode

Node | null

Returns

boolean

Inherited From HTMLElement.isEqualNode

isSameNode(Node | null)

The isSameNode() method of the Node interface is a legacy alias the for the === strict equality operator.

MDN Reference

function isSameNode(otherNode: Node | null): boolean

Parameters

otherNode

Node | null

Returns

boolean

Inherited From HTMLElement.isSameNode

lookupNamespaceURI(string | null)

The lookupNamespaceURI() method of the Node interface takes a prefix as parameter and returns the namespace URI associated with it on the given node if found (and null if not).

MDN Reference

function lookupNamespaceURI(prefix: string | null): string | null

Parameters

prefix

string | null

Returns

string | null

Inherited From HTMLElement.lookupNamespaceURI

lookupPrefix(string | null)

The lookupPrefix() method of the Node interface returns a string containing the prefix for a given namespace URI, if present, and null if not.

MDN Reference

function lookupPrefix(namespace: string | null): string | null

Parameters

namespace

string | null

Returns

string | null

Inherited From HTMLElement.lookupPrefix

matches(string)

The matches() method of the Element interface tests whether the element would be selected by the specified CSS selector.

MDN Reference

function matches(selectors: string): boolean

Parameters

selectors

string

Returns

boolean

Inherited From HTMLElement.matches

normalize()

The normalize() method of the Node interface puts the specified node and all of its sub-tree into a normalized form.

MDN Reference

function normalize()

Inherited From HTMLElement.normalize

prepend((string | Node)[])

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.

MDN Reference

function prepend(nodes: (string | Node)[])

Parameters

nodes

(string | Node)[]

Inherited From HTMLElement.prepend

querySelector<E>(string)

function querySelector<E>(selectors: string): E | null

Parameters

selectors

string

Returns

E | null

Inherited From HTMLElement.querySelector

querySelector<K>(K)

Returns the first element that is a descendant of node that matches selectors.

MDN Reference

function querySelector<K>(selectors: K): HTMLElementTagNameMap[K] | null

Parameters

selectors

K

Returns

HTMLElementTagNameMap[K] | null

Inherited From HTMLElement.querySelector

querySelector<K>(K)

function querySelector<K>(selectors: K): SVGElementTagNameMap[K] | null

Parameters

selectors

K

Returns

SVGElementTagNameMap[K] | null

Inherited From HTMLElement.querySelector

querySelector<K>(K)

function querySelector<K>(selectors: K): MathMLElementTagNameMap[K] | null

Parameters

selectors

K

Returns

MathMLElementTagNameMap[K] | null

Inherited From HTMLElement.querySelector

querySelector<K>(K)

Warning

This API is now deprecated.

function querySelector<K>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null

Parameters

selectors

K

Returns

HTMLElementDeprecatedTagNameMap[K] | null

Inherited From HTMLElement.querySelector

querySelectorAll<E>(string)

function querySelectorAll<E>(selectors: string): NodeListOf<E>

Parameters

selectors

string

Returns

NodeListOf<E>

Inherited From HTMLElement.querySelectorAll

querySelectorAll<K>(K)

Returns all element descendants of node that match selectors.

MDN Reference

function querySelectorAll<K>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>

Parameters

selectors

K

Returns

NodeListOf<HTMLElementTagNameMap[K]>

Inherited From HTMLElement.querySelectorAll

querySelectorAll<K>(K)

function querySelectorAll<K>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>

Parameters

selectors

K

Returns

NodeListOf<SVGElementTagNameMap[K]>

Inherited From HTMLElement.querySelectorAll

querySelectorAll<K>(K)

function querySelectorAll<K>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>

Parameters

selectors

K

Returns

NodeListOf<MathMLElementTagNameMap[K]>

Inherited From HTMLElement.querySelectorAll

querySelectorAll<K>(K)

Warning

This API is now deprecated.

function querySelectorAll<K>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>

Parameters

selectors

K

Returns

NodeListOf<HTMLElementDeprecatedTagNameMap[K]>

Inherited From HTMLElement.querySelectorAll

releasePointerCapture(number)

The releasePointerCapture() method of the previously set for a specific (PointerEvent) pointer.

MDN Reference

function releasePointerCapture(pointerId: number)

Parameters

pointerId

number

Inherited From HTMLElement.releasePointerCapture

remove()

Removes node.

MDN Reference

function remove()

Inherited From HTMLElement.remove

removeAttribute(string)

The Element method removeAttribute() removes the attribute with the specified name from the element.

MDN Reference

function removeAttribute(qualifiedName: string)

Parameters

qualifiedName

string

Inherited From HTMLElement.removeAttribute

removeAttributeNode(Attr)

The removeAttributeNode() method of the Element interface removes the specified Attr node from the element.

MDN Reference

function removeAttributeNode(attr: Attr): Attr

Parameters

attr

Attr

Returns

Attr

Inherited From HTMLElement.removeAttributeNode

removeAttributeNS(string | null, string)

The removeAttributeNS() method of the If you are working with HTML and you don't need to specify the requested attribute as being part of a specific namespace, use the Element.removeAttribute() method instead.

MDN Reference

function removeAttributeNS(namespace: string | null, localName: string)

Parameters

namespace

string | null

localName

string

Inherited From HTMLElement.removeAttributeNS

removeChild<T>(T)

The removeChild() method of the Node interface removes a child node from the DOM and returns the removed node.

MDN Reference

function removeChild<T>(child: T): T

Parameters

child

T

Returns

T

Inherited From HTMLElement.removeChild

replaceChild<T>(Node, T)

The replaceChild() method of the Node interface replaces a child node within the given (parent) node.

MDN Reference

function replaceChild<T>(node: Node, child: T): T

Parameters

node

Node

child

T

Returns

T

Inherited From HTMLElement.replaceChild

replaceChildren((string | Node)[])

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.

MDN Reference

function replaceChildren(nodes: (string | Node)[])

Parameters

nodes

(string | Node)[]

Inherited From HTMLElement.replaceChildren

replaceWith((string | Node)[])

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.

MDN Reference

function replaceWith(nodes: (string | Node)[])

Parameters

nodes

(string | Node)[]

Inherited From HTMLElement.replaceWith

requestFullscreen(FullscreenOptions)

The Element.requestFullscreen() method issues an asynchronous request to make the element be displayed in fullscreen mode.

MDN Reference

function requestFullscreen(options?: FullscreenOptions): Promise<void>

Parameters

options

FullscreenOptions

Returns

Promise<void>

Inherited From HTMLElement.requestFullscreen

requestPointerLock(PointerLockOptions)

The requestPointerLock() method of the Element interface lets you asynchronously ask for the pointer to be locked on the given element.

MDN Reference

function requestPointerLock(options?: PointerLockOptions): Promise<void>

Parameters

options

PointerLockOptions

Returns

Promise<void>

Inherited From HTMLElement.requestPointerLock

scroll(number, number)

function scroll(x: number, y: number)

Parameters

x

number

y

number

Inherited From HTMLElement.scroll

scroll(ScrollToOptions)

The scroll() method of the Element interface scrolls the element to a particular set of coordinates inside a given element.

MDN Reference

function scroll(options?: ScrollToOptions)

Parameters

options

ScrollToOptions

Inherited From HTMLElement.scroll

scrollBy(number, number)

function scrollBy(x: number, y: number)

Parameters

x

number

y

number

Inherited From HTMLElement.scrollBy

scrollBy(ScrollToOptions)

The scrollBy() method of the Element interface scrolls an element by the given amount.

MDN Reference

function scrollBy(options?: ScrollToOptions)

Parameters

options

ScrollToOptions

Inherited From HTMLElement.scrollBy

scrollIntoView(boolean | ScrollIntoViewOptions)

The Element interface's scrollIntoView() method scrolls the element's ancestor containers such that the element on which scrollIntoView() is called is visible to the user.

MDN Reference

function scrollIntoView(arg?: boolean | ScrollIntoViewOptions)

Parameters

arg

boolean | ScrollIntoViewOptions

Inherited From HTMLElement.scrollIntoView

scrollTo(number, number)

function scrollTo(x: number, y: number)

Parameters

x

number

y

number

Inherited From HTMLElement.scrollTo

scrollTo(ScrollToOptions)

The scrollTo() method of the Element interface scrolls to a particular set of coordinates inside a given element.

MDN Reference

function scrollTo(options?: ScrollToOptions)

Parameters

options

ScrollToOptions

Inherited From HTMLElement.scrollTo

setAttribute(string, string)

The setAttribute() method of the Element interface sets the value of an attribute on the specified element.

MDN Reference

function setAttribute(qualifiedName: string, value: string)

Parameters

qualifiedName

string

value

string

Inherited From HTMLElement.setAttribute

setAttributeNode(Attr)

The setAttributeNode() method of the Element interface adds a new Attr node to the specified element.

MDN Reference

function setAttributeNode(attr: Attr): Attr | null

Parameters

attr

Attr

Returns

Attr | null

Inherited From HTMLElement.setAttributeNode

setAttributeNodeNS(Attr)

The setAttributeNodeNS() method of the Element interface adds a new namespaced Attr node to an element.

MDN Reference

function setAttributeNodeNS(attr: Attr): Attr | null

Parameters

attr

Attr

Returns

Attr | null

Inherited From HTMLElement.setAttributeNodeNS

setAttributeNS(string | null, string, string)

setAttributeNS adds a new attribute or changes the value of an attribute with the given namespace and name.

MDN Reference

function setAttributeNS(namespace: string | null, qualifiedName: string, value: string)

Parameters

namespace

string | null

qualifiedName

string

value

string

Inherited From HTMLElement.setAttributeNS

setHTMLUnsafe(string)

The setHTMLUnsafe() method of the Element interface is used to parse a string of HTML into a DocumentFragment, optionally filtering out unwanted elements and attributes, and those that don't belong in the context, and then using it to replace the element's subtree in the DOM.

MDN Reference

function setHTMLUnsafe(html: string)

Parameters

html

string

Inherited From HTMLElement.setHTMLUnsafe

setPointerCapture(number)

The setPointerCapture() method of the capture target of future pointer events.

MDN Reference

function setPointerCapture(pointerId: number)

Parameters

pointerId

number

Inherited From HTMLElement.setPointerCapture

showPopover()

The showPopover() method of the HTMLElement interface shows a Popover_API element (i.e., one that has a valid popover attribute) by adding it to the top layer.

MDN Reference

function showPopover()

Inherited From HTMLElement.showPopover

toggleAttribute(string, boolean)

The toggleAttribute() method of the present and adding it if it is not present) on the given element.

MDN Reference

function toggleAttribute(qualifiedName: string, force?: boolean): boolean

Parameters

qualifiedName

string

force

boolean

Returns

boolean

Inherited From HTMLElement.toggleAttribute

togglePopover(boolean)

The togglePopover() method of the HTMLElement interface toggles a Popover_API element (i.e., one that has a valid popover attribute) between the hidden and showing states.

MDN Reference

function togglePopover(options?: boolean): boolean

Parameters

options

boolean

Returns

boolean

Inherited From HTMLElement.togglePopover

webkitMatchesSelector(string)

Warning

This API is now deprecated.

This is a legacy alias of matches.

MDN Reference

function webkitMatchesSelector(selectors: string): boolean

Parameters

selectors

string

Returns

boolean

Inherited From HTMLElement.webkitMatchesSelector