HTMLTableElement

The HTMLTableElement interface provides special properties and methods (beyond the regular HTMLElement object interface it also has available to it by inheritance) for manipulating the layout and presentation of tables in an HTML document.

MDN Reference

Properties

Link copied to clipboard

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

Link copied to clipboard

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.

Link copied to clipboard

The ariaActiveDescendantElement property of the Element interface represents the current active element when focus is on a composite widget, combobox, textbox, group, or application.

Link copied to clipboard
open var ariaAtomic: String?

The ariaAtomic property of the Element interface reflects the value of the aria-atomic attribute, which indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.

Link copied to clipboard

The ariaAutoComplete property of the Element interface reflects the value of the aria-autocomplete attribute, which indicates whether inputting text could trigger display of one or more predictions of the user's intended value for a combobox, searchbox, or textbox and specifies how predictions would be presented if they were made.

Link copied to clipboard

The ariaBrailleLabel property of the Element interface reflects the value of the aria-braillelabel attribute, which defines the ARIA braille label of the element.

Link copied to clipboard

The ariaBrailleRoleDescription property of the Element interface reflects the value of the aria-brailleroledescription attribute, which defines the ARIA braille role description of the element.

Link copied to clipboard
open var ariaBusy: String?

The ariaBusy property of the Element interface reflects the value of the aria-busy attribute, which indicates whether an element is being modified, as assistive technologies may want to wait until the modifications are complete before exposing them to the user.

Link copied to clipboard
open var ariaChecked: String?

The ariaChecked property of the Element interface reflects the value of the aria-checked attribute, which indicates the current "checked" state of checkboxes, radio buttons, and other widgets that have a checked state.

Link copied to clipboard
open var ariaColCount: String?

The ariaColCount property of the Element interface reflects the value of the aria-colcount attribute, which defines the number of columns in a table, grid, or treegrid.

Link copied to clipboard
open var ariaColIndex: String?

The ariaColIndex property of the Element interface reflects the value of the aria-colindex attribute, which defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.

Link copied to clipboard

The ariaColIndexText property of the Element interface reflects the value of the aria-colindextext attribute, which defines a human readable text alternative of aria-colindex.

Link copied to clipboard
open var ariaColSpan: String?

The ariaColSpan property of the Element interface reflects the value of the aria-colspan attribute, which defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.

Link copied to clipboard

The ariaControlsElements property of the Element interface is an array containing the elements that are controlled by the element it is applied to. For example, this might be set on a combobox to indicate the element that it pops up, or on a scrollbar to indicate the ID of the element it controls.

Link copied to clipboard
open var ariaCurrent: String?

The ariaCurrent property of the Element interface reflects the value of the aria-current attribute, which indicates the element that represents the current item within a container or set of related elements.

Link copied to clipboard

The ariaDescribedByElements property of the Element interface is an array containing the element (or elements) that provide an accessible description for the element it is applied to. The accessible description is similar to the accessible label (see ariaLabelledByElements), but provides more verbose information.

Link copied to clipboard

The ariaDescription property of the Element interface reflects the value of the aria-description attribute, which defines a string value that describes or annotates the current element.

Link copied to clipboard

The ariaDetailsElements property of the Element interface is an array containing the element (or elements) that provide an accessible details for the element it is applied to. The accessible details are similar to the accessible description (see ariaDescribedByElements), but provides more verbose information.

Link copied to clipboard
open var ariaDisabled: String?

The ariaDisabled property of the Element interface reflects the value of the aria-disabled attribute, which indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.

Link copied to clipboard

The ariaErrorMessageElements property of the Element interface is an array containing the element (or elements) that provide an error message for the element it is applied to.

Link copied to clipboard
open var ariaExpanded: String?

The ariaExpanded property of the Element interface reflects the value of the aria-expanded attribute, which indicates whether a grouping element owned or controlled by this element is expanded or collapsed.

Link copied to clipboard

The ariaFlowToElements property of the Element interface is an array containing the element (or elements) that provide an alternate reading order of content, overriding the general default reading order at the user's discretion. If just one element is provided this is the next element in the reading order. If multiple elements are provided, then each element represents a possible path that should be offered to the user for selection.

Link copied to clipboard
open var ariaHasPopup: String?

The ariaHasPopup property of the Element interface reflects the value of the aria-haspopup attribute, which indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.

Link copied to clipboard
open var ariaHidden: String?

The ariaHidden property of the Element interface reflects the value of the aria-hidden) attribute, which indicates whether the element is exposed to an accessibility API.

Link copied to clipboard
open var ariaInvalid: String?

The ariaInvalid property of the Element interface reflects the value of the aria-invalid attribute. Relevant for the application, checkbox, combobox, gridcell, listbox, radiogroup, slider, spinbutton, textbox, and tree roles, it indicates to the accessibility API whether the entered value does not conform to the format expected by the application.

Link copied to clipboard

The ariaKeyShortcuts property of the Element interface reflects the value of the aria-keyshortcuts attribute, which indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.

Link copied to clipboard
open var ariaLabel: String?

The ariaLabel property of the Element interface reflects the value of the aria-label attribute, which defines a string value that labels the current element.

Link copied to clipboard

The ariaLabelledByElements property of the Element interface is an array containing the element (or elements) that provide an accessible name for the element it is applied to.

Link copied to clipboard
open var ariaLevel: String?

The ariaLevel property of the Element interface reflects the value of the aria-level attribute, which defines the hierarchical level of an element within a structure.

Link copied to clipboard
open var ariaLive: String?

The ariaLive property of the Element interface reflects the value of the aria-live attribute, which indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.

Link copied to clipboard
open var ariaModal: String?

The ariaModal property of the Element interface reflects the value of the aria-modal attribute, which indicates whether an element is modal when displayed. Applying the aria-modal property to an element with role="dialog" replaces the technique of using aria-hidden on the background for informing assistive technologies that content outside a dialog is inert.

Link copied to clipboard

The ariaMultiLine property of the Element interface reflects the value of the aria-multiline attribute, which indicates whether a text box accepts multiple lines of input or only a single line.

Link copied to clipboard

The ariaMultiSelectable property of the Element interface reflects the value of the aria-multiselectable attribute, which indicates that the user may select more than one item from the current selectable descendants.

Link copied to clipboard

The ariaOrientation property of the Element interface reflects the value of the aria-orientation attribute, which indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.

Link copied to clipboard

The ariaOwnsElements property of the Element interface is an array containing the element (or elements) that define a visual, functional, or contextual relationship between a parent element that it is applied to, and its child elements. This is used when the DOM hierarchy cannot be used to represent the relationship, and it would not otherwise be available to assistive technology,

Link copied to clipboard

The ariaPlaceholder property of the Element interface reflects the value of the aria-placeholder attribute, which defines a short hint intended to aid the user with data entry when the control has no value.

Link copied to clipboard
open var ariaPosInSet: String?

The ariaPosInSet property of the Element interface reflects the value of the aria-posinset attribute, which defines an element's number or position in the current set of listitems or treeitems.

Link copied to clipboard
open var ariaPressed: String?

The ariaPressed property of the Element interface reflects the value of the aria-pressed attribute, which indicates the current "pressed" state of toggle buttons.

Link copied to clipboard
open var ariaReadOnly: String?

The ariaReadOnly property of the Element interface reflects the value of the aria-readonly attribute, which indicates that the element is not editable, but is otherwise operable.

Link copied to clipboard
open var ariaRelevant: String?

The ariaRelevant property of the Element interface reflects the value of the aria-relevant attribute, which indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. This is used to describe what changes in an aria-live region are relevant and should be announced.

Link copied to clipboard
open var ariaRequired: String?

The ariaRequired property of the Element interface reflects the value of the aria-required attribute, which indicates that user input is required on the element before a form may be submitted.

Link copied to clipboard

The ariaRoleDescription property of the Element interface reflects the value of the aria-roledescription attribute, which defines a human-readable, author-localized description for the role of an element.

Link copied to clipboard
open var ariaRowCount: String?

The ariaRowCount property of the Element interface reflects the value of the aria-rowcount attribute, which defines the total number of rows in a table, grid, or treegrid.

Link copied to clipboard
open var ariaRowIndex: String?

The ariaRowIndex property of the Element interface reflects the value of the aria-rowindex attribute, which defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.

Link copied to clipboard

The ariaRowIndexText property of the Element interface reflects the value of the aria-rowindextext attribute, which defines a human readable text alternative of aria-rowindex.

Link copied to clipboard
open var ariaRowSpan: String?

The ariaRowSpan property of the Element interface reflects the value of the aria-rowspan attribute, which defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.

Link copied to clipboard
open var ariaSelected: String?

The ariaSelected property of the Element interface reflects the value of the aria-selected attribute, which indicates the current "selected" state of elements that have a selected state.

Link copied to clipboard
open var ariaSetSize: String?

The ariaSetSize property of the Element interface reflects the value of the aria-setsize attribute, which defines the number of items in the current set of listitems or treeitems.

Link copied to clipboard
open var ariaSort: String?

The ariaSort property of the Element interface reflects the value of the aria-sort attribute, which indicates if items in a table or grid are sorted in ascending or descending order.

Link copied to clipboard
open var ariaValueMax: String?

The ariaValueMax property of the Element interface reflects the value of the aria-valuemax attribute, which defines the maximum allowed value for a range widget.

Link copied to clipboard
open var ariaValueMin: String?

The ariaValueMin property of the Element interface reflects the value of the aria-valuemin attribute, which defines the minimum allowed value for a range widget.

Link copied to clipboard
open var ariaValueNow: String?

The ariaValueNow property of the Element interface reflects the value of the aria-valuenow attribute, which defines the current value for a range widget.

Link copied to clipboard

The ariaValueText property of the Element interface reflects the value of the aria-valuetext attribute, which defines the human-readable text alternative of aria-valuenow for a range widget.

Link copied to clipboard
Link copied to clipboard

The Element.attributes property returns a live collection of all attribute nodes registered to the specified node. It is a NamedNodeMap, not an Array, so it has no Array methods and the Attr nodes' indexes may differ among browsers. To be more specific, attributes is a key/value pair of strings that represents any information regarding that attribute.

Link copied to clipboard
Link copied to clipboard

The autocapitalize property of the HTMLElement interface represents the element's capitalization behavior for user input. It is available on all HTML elements, though it doesn't affect all of them, including:

Link copied to clipboard

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

Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard

The HTMLTableElement.caption property represents the table caption. If no caption element is associated with the table, this property is null.

Link copied to clipboard

The Document.childElementCount read-only property returns the number of child elements of the document.

Link copied to clipboard

The read-only childNodes property of the Node interface returns a live NodeList of child nodes of the given element where the first child node is assigned index 0. Child nodes include elements, text and comments.

Link copied to clipboard

The read-only children property returns a live HTMLCollection which contains all of the child elements of the document upon which it was called.

Link copied to clipboard

The read-only classList property of the Element interface contains a live DOMTokenList collection representing the class attribute of the element. This can then be used to manipulate the class list.

Link copied to clipboard

The className property of the Element interface gets and sets the value of the class attribute of the specified element.

Link copied to clipboard

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. It includes padding but excludes borders, margins, and horizontal scrollbars (if present).

Link copied to clipboard

The clientLeft read-only property of the Element interface returns the width of the left border of an element in pixels. It includes the width of the vertical scrollbar if the text direction of the element is right-to-left and if there is an overflow causing a left vertical scrollbar to be rendered. clientLeft does not include the left margin or the left padding.

Link copied to clipboard

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

Link copied to clipboard

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. It includes padding but excludes borders, margins, and vertical scrollbars (if present).

Link copied to clipboard
Link copied to clipboard

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.

Link copied to clipboard

The customElementRegistry read-only property of the Element interface returns the CustomElementRegistry object associated with this element, or null if one has not been set.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var dir: String

The HTMLElement.dir property indicates the text writing directionality of the content of the current element. It reflects the element's dir attribute.

Link copied to clipboard

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

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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.

Link copied to clipboard

The Document.firstElementChild read-only property returns the document's first child Element, or null if there are no child elements.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

The HTMLElement property inert reflects the value of the element's inert attribute. It is a boolean value that, when present, makes the browser "ignore" user input events for the element, including focus events and events from assistive technologies. The browser may also ignore page search and text selection in the element. This can be useful when building UIs such as modals where you would want to "trap" the focus inside the modal when it's visible.

Link copied to clipboard

The innerHTML property of the Element interface gets or sets the HTML or XML markup contained within the element, omitting any shadow roots in both cases.

Link copied to clipboard

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

Link copied to clipboard
Link copied to clipboard

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.

Link copied to clipboard
Link copied to clipboard

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 BCP 47 language tag. It reflects the element's lang attribute; the xml:lang attribute does not affect this property.

Link copied to clipboard

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

Link copied to clipboard

The Document.lastElementChild read-only property returns the document's last child Element, or null if there are no child elements.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

The read-only nodeType property of a Node interface is an integer that identifies what the node is. It distinguishes different kinds of nodes from each other, such as elements, text, and comments.

Link copied to clipboard

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

Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard

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.

Link copied to clipboard

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

Link copied to clipboard

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 offsetParent, the closest positioned ancestor element.

Link copied to clipboard

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

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The outerHTML attribute of the Element interface gets or sets the HTML or XML markup of the element and its descendants, omitting any shadow roots in both cases.

Link copied to clipboard

The outerText property of the HTMLElement interface returns the same value as HTMLElement.innerText. When used as a setter it replaces the whole current node with the given text (this differs from innerText, which replaces the content inside the current node).

Link copied to clipboard
open override val ownerDocument: Document

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

Link copied to clipboard

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. Node.parentNode on the other hand returns any kind of parent, regardless of its type.

Link copied to clipboard

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

Link copied to clipboard
val part: DOMTokenList<ERROR CLASS: Symbol not found for JsString>

The read-only part property of the Element interface contains a DOMTokenList object representing the part identifier(s) of the element. It reflects the element's part content attribute. These can be used to style parts of a shadow DOM, via the ::part pseudo-element.

Link copied to clipboard

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.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
open var role: String?

The role property of the Element interface returns the explicitly set WAI-ARIA role for the element.

Link copied to clipboard

The read-only HTMLTableElement property rows returns a live HTMLCollection of all the rows in the table, including the rows contained within any , , and elements.

Link copied to clipboard

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.

Link copied to clipboard

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. This value is subpixel precise in modern browsers, meaning that it isn't necessarily a whole number.

Link copied to clipboard

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. This value is subpixel precise in modern browsers, meaning that it isn't necessarily a whole number.

Link copied to clipboard

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.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

The spellcheck property of the HTMLElement interface represents a boolean value that controls the spell-checking hint. It is available on all HTML elements, though it doesn't affect all of them.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard

The HTMLTableElement.tBodies read-only property returns a live HTMLCollection of the bodies in a

Link copied to clipboard
open override var textContent: String?
Link copied to clipboard

The HTMLTableElement.tFoot property represents the

. element of a

Link copied to clipboard

The HTMLTableElement.tHead represents the

. Its value will be null if there is no such element. element of a

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

Functions

Link copied to clipboard
open fun after(vararg nodes: String)

open fun after(vararg nodes: Node)

Inserts nodes just after node, while replacing strings in nodes with equivalent Text nodes.

Link copied to clipboard
open fun animate(keyframes: ReadonlyArray<Keyframe>?, options: Double = definedExternally): Animation
open fun animate(keyframes: PropertyIndexedKeyframes?, options: Double = definedExternally): Animation
Link copied to clipboard
open fun append(vararg nodes: String)

open fun append(vararg nodes: Node)

The Document.append() method inserts a set of Node objects or strings after the last child of the document. Strings are inserted as equivalent Text nodes.

Link copied to clipboard
fun <T : Node> appendChild(node: 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.

Link copied to clipboard
Link copied to clipboard

The HTMLElement.attachInternals() method returns an ElementInternals object. This method allows a custom element to participate in HTML forms. The ElementInternals interface provides utilities for working with these elements in the same way you would work with any standard HTML form element, and also exposes the Accessibility Object Model to the element.

Link copied to clipboard

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

Link copied to clipboard
open fun before(vararg nodes: String)

open fun before(vararg nodes: Node)

Inserts nodes just before node, while replacing strings in nodes with equivalent Text nodes.

Link copied to clipboard
Link copied to clipboard
fun checkVisibility(options: CheckVisibilityOptions = definedExternally): Boolean

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

Link copied to clipboard
fun click()

The HTMLElement.click() method simulates a mouse click on an element. When called on an element, the element's click event is fired (unless its disabled attribute is set).

Link copied to clipboard
fun cloneNode(subtree: Boolean = definedExternally): Node

The cloneNode() method of the Node interface returns a duplicate of the node on which this method was called. Its parameter controls if the subtree contained in the node is also cloned or not.

Link copied to clipboard
fun closest(selector: String): Element?

fun <T : Element> closest(selector: TagName<T>): T?

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.

Link copied to clipboard

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

Link copied to clipboard

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.

Link copied to clipboard
fun contains(other: Node?): Boolean

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 (childNodes), one of the children's direct children, and so on.

Link copied to clipboard

The HTMLTableElement.createCaption() method returns the

. Its value will be null if there is no such element.
element associated with a given . If no element associated with a given
element exists on the table, this method creates it, and then returns it.

Link copied to clipboard

The createTBody() method of HTMLTableElement objects creates and returns a new

Link copied to clipboard

The createTFoot() method of HTMLTableElement objects returns the

. element associated with a given

Link copied to clipboard

The createTHead() method of HTMLTableElement objects returns the

. If no footer exists in the table, this method creates it, and then returns it. element associated with a given

Link copied to clipboard

The HTMLTableElement.deleteCaption() method removes the

. If no header exists in the table, this method creates it, and then returns it.
element from a given . If there is no ) from a given
element associated with the table, this method does nothing.

Link copied to clipboard
fun deleteRow(index: Int)

The HTMLTableElement.deleteRow() method removes a specific row (

Link copied to clipboard

The HTMLTableElement.deleteTFoot() method removes the

. element from a given

Link copied to clipboard

The HTMLTableElement.deleteTHead() removes the

. element from a given

Link copied to clipboard
open fun dispatchEvent(event: Event): Boolean
Link copied to clipboard
open fun focus(options: FocusOptions = definedExternally)
Link copied to clipboard
Link copied to clipboard
fun getAttribute(qualifiedName: String): String?

The getAttribute() method of the Element interface returns the value of a specified attribute on the element.

Link copied to clipboard
fun getAttributeNames(): ReadonlyArray<ERROR CLASS: Symbol not found for JsString>

The getAttributeNames() method of the Element interface returns the attribute names of the element as an Array of strings. If the element has no attributes it returns an empty array.

Link copied to clipboard
fun getAttributeNode(qualifiedName: String): Attr?

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

Link copied to clipboard
fun getAttributeNodeNS(namespace: String?, localName: String): Attr?

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

Link copied to clipboard
fun getAttributeNS(namespace: String?, localName: String): String?

The getAttributeNS() method of the Element interface returns the string value of the attribute with the specified namespace and name. If the named attribute does not exist, the value returned will either be null or "" (the empty string); see Notes for details.

Link copied to clipboard

The Element.getBoundingClientRect() method returns a DOMRect object providing information about the size of an element and its position relative to the viewport.

Link copied to clipboard

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.

Link copied to clipboard

The Element method getElementsByClassName() returns a live HTMLCollection which contains every descendant element which has the specified class name or names.

Link copied to clipboard

The Element.getElementsByTagName() method returns a live HTMLCollection of elements with the given tag name.

Link copied to clipboard
fun <T : Element> getElementsByTagNameNS(namespaceURI: TagNamespace<T>, localName: TagName<T>): HTMLCollection<T>
Link copied to clipboard
fun getHTML(options: GetHTMLOptions = definedExternally): String

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

Link copied to clipboard
fun getRootNode(options: GetRootNodeOptions = definedExternally): Node

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

Link copied to clipboard
fun hasAttribute(qualifiedName: String): Boolean

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

Link copied to clipboard
fun hasAttributeNS(namespace: String?, localName: String): Boolean

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
fun hasPointerCapture(pointerId: Int): Boolean

The hasPointerCapture() method of the Element interface checks whether the element on which it is invoked has pointer capture for the pointer identified by the given pointer ID.

Link copied to clipboard

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.

Link copied to clipboard

The insertAdjacentElement() method of the Element interface inserts a given element node at a given position relative to the element it is invoked upon.

Link copied to clipboard
fun insertAdjacentHTML(position: InsertPosition, string: String)

The insertAdjacentHTML() method of the Element interface parses the specified input as HTML or XML and inserts the resulting nodes into the DOM tree at a specified position.

Link copied to clipboard

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.

Link copied to clipboard
fun <T : Node> insertBefore(node: T, child: Node?): T

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

Link copied to clipboard
fun insertRow(index: Int = definedExternally): HTMLTableRowElement

The insertRow() method of the HTMLTableElement interface inserts a new row (

. ) in a given

Link copied to clipboard
Link copied to clipboard

The isDefaultNamespace() method of the Node interface accepts a namespace URI as an argument. It returns a boolean value that is true if the namespace is the default namespace on the given node and false if not. The default namespace can be retrieved with Node.lookupNamespaceURI() by passing null as the argument.

Link copied to clipboard
fun isEqualNode(otherNode: Node?): Boolean

The isEqualNode() method of the Node interface tests whether two nodes are equal. Two nodes are equal when they have the same type, defining characteristics (for elements, this would be their ID, number of children, and so forth), its attributes match, and so on. The specific set of data points that must match varies depending on the types of the nodes.

Link copied to clipboard
fun isSameNode(otherNode: Node?): Boolean

The isSameNode() method of the Node interface is a legacy alias the for the === strict equality operator. That is, it tests whether two nodes are the same (in other words, whether they reference the same object).

Link copied to clipboard

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). This method's existence allows Node objects to be passed as a namespace resolver to XPathEvaluator.createExpression() and XPathEvaluator.evaluate().

Link copied to clipboard
fun lookupPrefix(namespace: String?): String?

The lookupPrefix() method of the Node interface returns a string containing the prefix for a given namespace URI, if present, and null if not. When multiple prefixes are possible, the first prefix is returned.

Link copied to clipboard
fun matches(selectors: String): Boolean

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

Link copied to clipboard
open fun moveBefore(node: Node, child: Node?)

The moveBefore() method of the Document interface moves a given Node inside the Document DOM node as a direct child, before a given reference node.

Link copied to clipboard
Link copied to clipboard
fun normalize()

The normalize() method of the Node interface puts the specified node and all of its sub-tree into a normalized form. In a normalized sub-tree, no text nodes in the sub-tree are empty and there are no adjacent text nodes.

Link copied to clipboard
open fun prepend(vararg nodes: String)

open fun prepend(vararg nodes: Node)

The Document.prepend() method inserts a set of Node objects or strings before the first child of the document. Strings are inserted as equivalent Text nodes.

Link copied to clipboard
open fun querySelector(selectors: String): Element?

open fun <T : Element> querySelector(selectors: TagName<T>): T?

The Document method querySelector() returns the first Element within the document that matches the specified CSS selector, or group of CSS selectors. If no matches are found, null is returned.

Link copied to clipboard
open fun querySelectorAll(selectors: String): NodeList<Element>

open fun <T : Element> querySelectorAll(selectors: TagName<T>): NodeList<T>

The Document method querySelectorAll() returns a static (not live) NodeList representing a list of the document's elements that match the specified group of selectors.

Link copied to clipboard
fun releasePointerCapture(pointerId: Int)

The releasePointerCapture() method of the Element interface releases (stops) pointer capture that was previously set for a specific (PointerEvent) pointer.

Link copied to clipboard
open fun remove()

Removes node.

Link copied to clipboard
fun removeAttribute(qualifiedName: String)

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

Link copied to clipboard

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

Link copied to clipboard
fun removeAttributeNS(namespace: String?, localName: String)

The removeAttributeNS() method of the Element interface removes the specified attribute with the specified namespace from an element.

Link copied to clipboard
fun <T : Node> removeChild(child: T): T

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

Link copied to clipboard
fun <T : Node> replaceChild(node: Node, child: T): T

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

Link copied to clipboard
open fun replaceChildren()
open fun replaceChildren(vararg nodes: String)

open fun replaceChildren(vararg nodes: Node)

The Document.replaceChildren() method replaces the existing children of a Document with a specified new set of children.

Link copied to clipboard
open fun replaceWith(vararg nodes: String)

open fun replaceWith(vararg nodes: Node)

Replaces node with nodes, while replacing strings in nodes with equivalent Text nodes.

Link copied to clipboard
inline suspend fun Element.requestFullscreen()
inline suspend fun Element.requestFullscreen(options: FullscreenOptions)

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

Link copied to clipboard
fun requestFullscreenAsync(options: FullscreenOptions = definedExternally): Promise<Void>

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

Link copied to clipboard
inline suspend fun Element.requestPointerLock()
inline suspend fun Element.requestPointerLock(options: PointerLockOptions)

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

Link copied to clipboard
fun requestPointerLockAsync(options: PointerLockOptions = definedExternally): Promise<Void>

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

Link copied to clipboard
Link copied to clipboard
fun scroll(options: ScrollToOptions = definedExternally)

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

fun scroll(x: Double, y: Double)
Link copied to clipboard
fun scrollBy(options: ScrollToOptions = definedExternally)

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

fun scrollBy(x: Double, y: Double)
Link copied to clipboard
fun scrollIntoView(options: ScrollIntoViewOptions = definedExternally)

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.

Link copied to clipboard
fun scrollTo(options: ScrollToOptions = definedExternally)

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

fun scrollTo(x: Double, y: Double)
Link copied to clipboard
fun setAttribute(qualifiedName: String, value: String)

The setAttribute() method of the Element interface sets the value of an attribute on the specified element. If the attribute already exists, the value is updated; otherwise a new attribute is added with the specified name and value.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
fun setAttributeNS(namespace: String?, qualifiedName: String, value: String)

The setAttributeNS() method of the Element interface adds a new attribute or changes the value of an attribute with the given namespace and name.

Link copied to clipboard
fun setHTML(html: String, options: SetHTMLOptions = definedExternally)

The setHTML() method of the Element interface provides an XSS-safe method to parse and sanitize a string of HTML and insert it into the DOM as a subtree of the element.

Link copied to clipboard

The setHTMLUnsafe() method of the Element interface is used to parse HTML input 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.

Link copied to clipboard
fun setPointerCapture(pointerId: Int)

The setPointerCapture() method of the Element interface is used to designate a specific element as the capture target of future pointer events. Subsequent events for the pointer will be targeted at the capture element until capture is released (via Element.releasePointerCapture() or the pointerup event is fired).

Link copied to clipboard
fun showPopover(options: ShowPopoverOptions = definedExternally)

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

Link copied to clipboard
fun toggleAttribute(qualifiedName: String, force: Boolean = definedExternally): Boolean

The toggleAttribute() method of the Element interface toggles a Boolean attribute on the given element, removing it if present and adding it if not present.

Link copied to clipboard

fun togglePopover(options: TogglePopoverOptions = definedExternally): Boolean

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

Link copied to clipboard
, and returns a reference to the new row.