Constructors

Element
Link copied to clipboard
fun Element()

Types

Companion
Link copied to clipboard
object Companion

Functions

addEventListener
Link copied to clipboard
fun addEventListener(type: String, callback: (Event) -> Unit?, options: dynamic = definedExternally)
fun addEventListener(type: String, callback: EventListener?, options: dynamic = definedExternally)
after
Link copied to clipboard
abstract fun after(vararg nodes: dynamic)
append
Link copied to clipboard
abstract fun append(vararg nodes: dynamic)
appendChild
Link copied to clipboard
fun appendChild(node: Node): Node
attachShadow
Link copied to clipboard
fun attachShadow(init: ShadowRootInit): ShadowRoot
before
Link copied to clipboard
abstract fun before(vararg nodes: dynamic)
cloneNode
Link copied to clipboard
fun cloneNode(deep: Boolean = definedExternally): Node
closest
Link copied to clipboard
fun closest(selectors: String): Element?
compareDocumentPosition
Link copied to clipboard
fun compareDocumentPosition(other: Node): Short
contains
Link copied to clipboard
fun contains(other: Node?): Boolean
convertPointFromNode
Link copied to clipboard
abstract fun convertPointFromNode(point: DOMPointInit, from: dynamic, options: ConvertCoordinateOptions = definedExternally): DOMPoint
convertQuadFromNode
Link copied to clipboard
abstract fun convertQuadFromNode(quad: dynamic, from: dynamic, options: ConvertCoordinateOptions = definedExternally): DOMQuad
convertRectFromNode
Link copied to clipboard
abstract fun convertRectFromNode(rect: DOMRectReadOnly, from: dynamic, options: ConvertCoordinateOptions = definedExternally): DOMQuad
dispatchEvent
Link copied to clipboard
fun dispatchEvent(event: Event): Boolean
getAttribute
Link copied to clipboard
fun getAttribute(qualifiedName: String): String?
getAttributeNames
Link copied to clipboard
fun getAttributeNames(): Array<String>
getAttributeNode
Link copied to clipboard
fun getAttributeNode(qualifiedName: String): Attr?
getAttributeNodeNS
Link copied to clipboard
fun getAttributeNodeNS(namespace: String?, localName: String): Attr?
getAttributeNS
Link copied to clipboard
fun getAttributeNS(namespace: String?, localName: String): String?
getBoundingClientRect
Link copied to clipboard
fun getBoundingClientRect(): DOMRect
getBoxQuads
Link copied to clipboard
abstract fun getBoxQuads(options: BoxQuadOptions = definedExternally): Array<DOMQuad>
getClientRects
Link copied to clipboard
fun getClientRects(): Array<DOMRect>
getElementsByClassName
Link copied to clipboard
fun getElementsByClassName(classNames: String): HTMLCollection
getElementsByTagName
Link copied to clipboard
fun getElementsByTagName(qualifiedName: String): HTMLCollection
getElementsByTagNameNS
Link copied to clipboard
fun getElementsByTagNameNS(namespace: String?, localName: String): HTMLCollection
getRootNode
Link copied to clipboard
fun getRootNode(options: GetRootNodeOptions = definedExternally): Node
hasAttribute
Link copied to clipboard
fun hasAttribute(qualifiedName: String): Boolean
hasAttributeNS
Link copied to clipboard
fun hasAttributeNS(namespace: String?, localName: String): Boolean
hasAttributes
Link copied to clipboard
fun hasAttributes(): Boolean
hasChildNodes
Link copied to clipboard
fun hasChildNodes(): Boolean
hasPointerCapture
Link copied to clipboard
fun hasPointerCapture(pointerId: Int): Boolean
insertAdjacentElement
Link copied to clipboard
fun insertAdjacentElement(where: String, element: Element): Element?
insertAdjacentHTML
Link copied to clipboard
fun insertAdjacentHTML(position: String, text: String)
insertAdjacentText
Link copied to clipboard
fun insertAdjacentText(where: String, data: String)
insertBefore
Link copied to clipboard
fun insertBefore(node: Node, child: Node?): Node
isDefaultNamespace
Link copied to clipboard
fun isDefaultNamespace(namespace: String?): Boolean
isEqualNode
Link copied to clipboard
fun isEqualNode(otherNode: Node?): Boolean
isSameNode
Link copied to clipboard
fun isSameNode(otherNode: Node?): Boolean
lookupNamespaceURI
Link copied to clipboard
fun lookupNamespaceURI(prefix: String?): String?
lookupPrefix
Link copied to clipboard
fun lookupPrefix(namespace: String?): String?
matches
Link copied to clipboard
fun matches(selectors: String): Boolean
normalize
Link copied to clipboard
fun normalize()
prepend
Link copied to clipboard
abstract fun prepend(vararg nodes: dynamic)
querySelector
Link copied to clipboard
abstract fun querySelector(selectors: String): Element?
querySelectorAll
Link copied to clipboard
abstract fun querySelectorAll(selectors: String): NodeList
releasePointerCapture
Link copied to clipboard
fun releasePointerCapture(pointerId: Int)
remove
Link copied to clipboard
abstract fun remove()
removeAttribute
Link copied to clipboard
fun removeAttribute(qualifiedName: String)
removeAttributeNode
Link copied to clipboard
fun removeAttributeNode(attr: Attr): Attr
removeAttributeNS
Link copied to clipboard
fun removeAttributeNS(namespace: String?, localName: String)
removeChild
Link copied to clipboard
fun removeChild(child: Node): Node
removeEventListener
Link copied to clipboard
fun removeEventListener(type: String, callback: (Event) -> Unit?, options: dynamic = definedExternally)
fun removeEventListener(type: String, callback: EventListener?, options: dynamic = definedExternally)
replaceChild
Link copied to clipboard
fun replaceChild(node: Node, child: Node): Node
replaceWith
Link copied to clipboard
abstract fun replaceWith(vararg nodes: dynamic)
requestFullscreen
Link copied to clipboard
fun requestFullscreen(): Promise<Unit>
scroll
Link copied to clipboard
fun scroll(options: ScrollToOptions = definedExternally)
fun scroll(x: Double, y: Double)
scrollBy
Link copied to clipboard
fun scrollBy(options: ScrollToOptions = definedExternally)
fun scrollBy(x: Double, y: Double)
scrollIntoView
Link copied to clipboard
fun scrollIntoView()
fun scrollIntoView(arg: dynamic)
scrollTo
Link copied to clipboard
fun scrollTo(options: ScrollToOptions = definedExternally)
fun scrollTo(x: Double, y: Double)
setAttribute
Link copied to clipboard
fun setAttribute(qualifiedName: String, value: String)
setAttributeNode
Link copied to clipboard
fun setAttributeNode(attr: Attr): Attr?
setAttributeNodeNS
Link copied to clipboard
fun setAttributeNodeNS(attr: Attr): Attr?
setAttributeNS
Link copied to clipboard
fun setAttributeNS(namespace: String?, qualifiedName: String, value: String)
setPointerCapture
Link copied to clipboard
fun setPointerCapture(pointerId: Int)
webkitMatchesSelector
Link copied to clipboard
fun webkitMatchesSelector(selectors: String): Boolean

Properties

assignedSlot
Link copied to clipboard
open val assignedSlot: HTMLSlotElement?
attributes
Link copied to clipboard
open val attributes: NamedNodeMap
baseURI
Link copied to clipboard
open val baseURI: String
childElementCount
Link copied to clipboard
abstract val childElementCount: Int
childNodes
Link copied to clipboard
open val childNodes: NodeList
children
Link copied to clipboard
abstract val children: HTMLCollection
classList
Link copied to clipboard
open val classList: DOMTokenList
className
Link copied to clipboard
open var className: String
clientHeight
Link copied to clipboard
open val clientHeight: Int
clientLeft
Link copied to clipboard
open val clientLeft: Int
clientTop
Link copied to clipboard
open val clientTop: Int
clientWidth
Link copied to clipboard
open val clientWidth: Int
firstChild
Link copied to clipboard
open val firstChild: Node?
firstElementChild
Link copied to clipboard
open val firstElementChild: Element?
id
Link copied to clipboard
open var id: String
innerHTML
Link copied to clipboard
open var innerHTML: String
isConnected
Link copied to clipboard
open val isConnected: Boolean
lastChild
Link copied to clipboard
open val lastChild: Node?
lastElementChild
Link copied to clipboard
open val lastElementChild: Element?
localName
Link copied to clipboard
open val localName: String
namespaceURI
Link copied to clipboard
open val namespaceURI: String?
nextElementSibling
Link copied to clipboard
open val nextElementSibling: Element?
nextSibling
Link copied to clipboard
open val nextSibling: Node?
nodeName
Link copied to clipboard
open val nodeName: String
nodeType
Link copied to clipboard
open val nodeType: Short
nodeValue
Link copied to clipboard
open var nodeValue: String?
outerHTML
Link copied to clipboard
open var outerHTML: String
ownerDocument
Link copied to clipboard
open val ownerDocument: Document?
parentElement
Link copied to clipboard
open val parentElement: Element?
parentNode
Link copied to clipboard
open val parentNode: Node?
prefix
Link copied to clipboard
open val prefix: String?
previousElementSibling
Link copied to clipboard
open val previousElementSibling: Element?
previousSibling
Link copied to clipboard
open val previousSibling: Node?
scrollHeight
Link copied to clipboard
open val scrollHeight: Int
scrollLeft
Link copied to clipboard
open var scrollLeft: Double
scrollTop
Link copied to clipboard
open var scrollTop: Double
scrollWidth
Link copied to clipboard
open val scrollWidth: Int
shadowRoot
Link copied to clipboard
open val shadowRoot: ShadowRoot?
slot
Link copied to clipboard
open var slot: String
tagName
Link copied to clipboard
open val tagName: String
textContent
Link copied to clipboard
open var textContent: String?

Inheritors

HTMLElement
Link copied to clipboard
SVGElement
Link copied to clipboard

Extensions

addClass
Link copied to clipboard
@DeprecatedSinceKotlin(warningSince = "1.4")
inline fun Element.addClass(vararg cssClasses: String): Boolean
fun Element.addClass(vararg cssClasses: String): Boolean

Adds CSS class to element. Has no effect if all specified classes are already in class attribute of the element

appendElement
Link copied to clipboard
@DeprecatedSinceKotlin(warningSince = "1.4")
inline fun Element.appendElement(name: String, noinline init: Element.() -> Unit): Element

Appends a newly created element with the specified name to this element.

fun Element.appendElement(name: String, init: Element.() -> Unit): Element

Appends a newly created element with the specified name to this element.

appendText
Link copied to clipboard
@DeprecatedSinceKotlin(warningSince = "1.4")
inline fun Element.appendText(text: String): Element
fun Element.appendText(text: String): Element

Creates text node and append it to the element.

hasClass
Link copied to clipboard
@DeprecatedSinceKotlin(warningSince = "1.4")
inline fun Element.hasClass(cssClass: String): Boolean
fun Element.hasClass(cssClass: String): Boolean

Returns true if the element has the given CSS class style in its 'class' attribute

removeClass
Link copied to clipboard
@DeprecatedSinceKotlin(warningSince = "1.4")
inline fun Element.removeClass(vararg cssClasses: String): Boolean

Removes all cssClasses from element. Has no effect if all specified classes are missing in class attribute of the element

fun Element.removeClass(vararg cssClasses: String): Boolean

Removes all cssClasses from element. Has no effect if all specified classes are missing in class attribute of the element