HTMLElement

abstract external class HTMLElement : 
    Element,
    ElementCSSInlineStyle,
    GlobalEventHandlers,
    DocumentAndElementEventHandlers,
    ElementContentEditable
(source)

Platform and version requirements: JS

Exposes the JavaScript HTMLElement to Kotlin

Constructors

<init>

HTMLElement()

Exposes the JavaScript HTMLElement to Kotlin

Properties

accessKey

open var accessKey: String

accessKeyLabel

open val accessKeyLabel: String

contextMenu

open var contextMenu: HTMLMenuElement?

dataset

open val dataset: DOMStringMap

dir

open var dir: String

draggable

open var draggable: Boolean

dropzone

open val dropzone: DOMTokenList

hidden

open var hidden: Boolean

innerText

open var innerText: String

lang

open var lang: String

offsetHeight

open val offsetHeight: Int

offsetLeft

open val offsetLeft: Int

offsetParent

open val offsetParent: Element?

offsetTop

open val offsetTop: Int

offsetWidth

open val offsetWidth: Int

spellcheck

open var spellcheck: Boolean

tabIndex

open var tabIndex: Int

title

open var title: String

translate

open var translate: Boolean

Inherited Properties

attributes

open val attributes: NamedNodeMap

classList

open val classList: DOMTokenList

className

open var className: String

clientHeight

open val clientHeight: Int

clientLeft

open val clientLeft: Int

clientTop

open val clientTop: Int

clientWidth

open val clientWidth: Int

contentEditable

abstract var contentEditable: String

id

open var id: String

innerHTML

open var innerHTML: String

isContentEditable

abstract val isContentEditable: Boolean

localName

open val localName: String

namespaceURI

open val namespaceURI: String?

onabort

abstract var onabort: (Event) -> dynamic

onblur

abstract var onblur: (Event) -> dynamic

oncancel

abstract var oncancel: (Event) -> dynamic

oncanplay

abstract var oncanplay: (Event) -> dynamic

oncanplaythrough

abstract var oncanplaythrough: (Event) -> dynamic

onchange

abstract var onchange: (Event) -> dynamic

onclick

abstract var onclick: (Event) -> dynamic

onclose

abstract var onclose: (Event) -> dynamic

oncontextmenu

abstract var oncontextmenu: (Event) -> dynamic

oncopy

abstract var oncopy: (Event) -> dynamic

oncuechange

abstract var oncuechange: (Event) -> dynamic

oncut

abstract var oncut: (Event) -> dynamic

ondblclick

abstract var ondblclick: (Event) -> dynamic

ondrag

abstract var ondrag: (Event) -> dynamic

ondragend

abstract var ondragend: (Event) -> dynamic

ondragenter

abstract var ondragenter: (Event) -> dynamic

ondragexit

abstract var ondragexit: (Event) -> dynamic

ondragleave

abstract var ondragleave: (Event) -> dynamic

ondragover

abstract var ondragover: (Event) -> dynamic

ondragstart

abstract var ondragstart: (Event) -> dynamic

ondrop

abstract var ondrop: (Event) -> dynamic

ondurationchange

abstract var ondurationchange: (Event) -> dynamic

onemptied

abstract var onemptied: (Event) -> dynamic

onended

abstract var onended: (Event) -> dynamic

onerror

abstract var onerror: (dynamic, String, Int, Int, Any?) -> dynamic

onfocus

abstract var onfocus: (Event) -> dynamic

oninput

abstract var oninput: (Event) -> dynamic

oninvalid

abstract var oninvalid: (Event) -> dynamic

onkeydown

abstract var onkeydown: (Event) -> dynamic

onkeypress

abstract var onkeypress: (Event) -> dynamic

onkeyup

abstract var onkeyup: (Event) -> dynamic

onload

abstract var onload: (Event) -> dynamic

onloadeddata

abstract var onloadeddata: (Event) -> dynamic

onloadedmetadata

abstract var onloadedmetadata: (Event) -> dynamic

onloadend

abstract var onloadend: (Event) -> dynamic

onloadstart

abstract var onloadstart: (Event) -> dynamic

onmousedown

abstract var onmousedown: (Event) -> dynamic

onmouseenter

abstract var onmouseenter: (Event) -> dynamic

onmouseleave

abstract var onmouseleave: (Event) -> dynamic

onmousemove

abstract var onmousemove: (Event) -> dynamic

onmouseout

abstract var onmouseout: (Event) -> dynamic

onmouseover

abstract var onmouseover: (Event) -> dynamic

onmouseup

abstract var onmouseup: (Event) -> dynamic

onpaste

abstract var onpaste: (Event) -> dynamic

onpause

abstract var onpause: (Event) -> dynamic

onplay

abstract var onplay: (Event) -> dynamic

onplaying

abstract var onplaying: (Event) -> dynamic

onprogress

abstract var onprogress: (Event) -> dynamic

onratechange

abstract var onratechange: (Event) -> dynamic

onreset

abstract var onreset: (Event) -> dynamic

onresize

abstract var onresize: (Event) -> dynamic

onscroll

abstract var onscroll: (Event) -> dynamic

onseeked

abstract var onseeked: (Event) -> dynamic

onseeking

abstract var onseeking: (Event) -> dynamic

onselect

abstract var onselect: (Event) -> dynamic

onshow

abstract var onshow: (Event) -> dynamic

onstalled

abstract var onstalled: (Event) -> dynamic

onsubmit

abstract var onsubmit: (Event) -> dynamic

onsuspend

abstract var onsuspend: (Event) -> dynamic

ontimeupdate

abstract var ontimeupdate: (Event) -> dynamic

ontoggle

abstract var ontoggle: (Event) -> dynamic

onvolumechange

abstract var onvolumechange: (Event) -> dynamic

onwaiting

abstract var onwaiting: (Event) -> dynamic

onwheel

abstract var onwheel: (Event) -> dynamic

outerHTML

open var outerHTML: String

prefix

open val prefix: String?

scrollHeight

open val scrollHeight: Int

scrollLeft

open var scrollLeft: Double

scrollTop

open var scrollTop: Double

scrollWidth

open val scrollWidth: Int

shadowRoot

open val shadowRoot: ShadowRoot?

slot

open var slot: String

style

abstract val style: CSSStyleDeclaration

tagName

open val tagName: String

Functions

blur

fun blur()

click

fun click()

focus

fun focus()

forceSpellCheck

fun forceSpellCheck()

Inherited Functions

attachShadow

fun attachShadow(init: ShadowRootInit): ShadowRoot

closest

fun closest(selectors: String): Element?

getAttribute

fun getAttribute(qualifiedName: String): String?

getAttributeNS

fun getAttributeNS(
    namespace: String?,
    localName: String
): String?

getAttributeNames

fun getAttributeNames(): Array<String>

getAttributeNode

fun getAttributeNode(qualifiedName: String): Attr?

getAttributeNodeNS

fun getAttributeNodeNS(
    namespace: String?,
    localName: String
): Attr?

getBoundingClientRect

fun getBoundingClientRect(): DOMRect

getClientRects

fun getClientRects(): Array<DOMRect>

getElementsByClassName

fun getElementsByClassName(
    classNames: String
): HTMLCollection

getElementsByTagName

fun getElementsByTagName(
    qualifiedName: String
): HTMLCollection

getElementsByTagNameNS

fun getElementsByTagNameNS(
    namespace: String?,
    localName: String
): HTMLCollection

hasAttribute

fun hasAttribute(qualifiedName: String): Boolean

hasAttributeNS

fun hasAttributeNS(
    namespace: String?,
    localName: String
): Boolean

hasAttributes

fun hasAttributes(): Boolean

insertAdjacentElement

fun insertAdjacentElement(
    where: String,
    element: Element
): Element?

insertAdjacentHTML

fun insertAdjacentHTML(position: String, text: String)

insertAdjacentText

fun insertAdjacentText(where: String, data: String)

matches

fun matches(selectors: String): Boolean

removeAttribute

fun removeAttribute(qualifiedName: String)

removeAttributeNS

fun removeAttributeNS(namespace: String?, localName: String)

removeAttributeNode

fun removeAttributeNode(attr: Attr): Attr

requestFullscreen

fun requestFullscreen(): Promise<Unit>

scroll

fun scroll(options: ScrollToOptions = definedExternally)
fun scroll(x: Double, y: Double)

scrollBy

fun scrollBy(options: ScrollToOptions = definedExternally)
fun scrollBy(x: Double, y: Double)

scrollIntoView

fun scrollIntoView()
fun scrollIntoView(arg: dynamic)

scrollTo

fun scrollTo(options: ScrollToOptions = definedExternally)
fun scrollTo(x: Double, y: Double)

setAttribute

fun setAttribute(qualifiedName: String, value: String)

setAttributeNS

fun setAttributeNS(
    namespace: String?,
    qualifiedName: String,
    value: String)

setAttributeNode

fun setAttributeNode(attr: Attr): Attr?

setAttributeNodeNS

fun setAttributeNodeNS(attr: Attr): Attr?

webkitMatchesSelector

fun webkitMatchesSelector(selectors: String): Boolean

Extension Properties

isElement

val Node.isElement: Boolean

Gets a value indicating whether this node is an Element.

isText

val Node.isText: Boolean

Gets a value indicating whether this node is a TEXT_NODE or a CDATA_SECTION_NODE.

Extension Functions

addClass

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

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

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

appendText

fun Element.appendText(text: String): Element

Creates text node and append it to the element.

clear

fun Node.clear()

Removes all the children from this node.

hasClass

fun Element.hasClass(cssClass: String): Boolean

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

removeClass

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

Inheritors

HTMLAnchorElement

abstract external class HTMLAnchorElement : 
    HTMLElement,
    HTMLHyperlinkElementUtils

Exposes the JavaScript HTMLAnchorElement to Kotlin

HTMLAppletElement

abstract external class HTMLAppletElement : HTMLElement

HTMLAreaElement

abstract external class HTMLAreaElement : 
    HTMLElement,
    HTMLHyperlinkElementUtils

Exposes the JavaScript HTMLAreaElement to Kotlin

HTMLBRElement

abstract external class HTMLBRElement : HTMLElement

Exposes the JavaScript HTMLBRElement to Kotlin

HTMLBaseElement

abstract external class HTMLBaseElement : HTMLElement

Exposes the JavaScript HTMLBaseElement to Kotlin

HTMLBodyElement

abstract external class HTMLBodyElement : 
    HTMLElement,
    WindowEventHandlers

Exposes the JavaScript HTMLBodyElement to Kotlin

HTMLButtonElement

abstract external class HTMLButtonElement : HTMLElement

Exposes the JavaScript HTMLButtonElement to Kotlin

HTMLCanvasElement

abstract external class HTMLCanvasElement : 
    HTMLElement,
    TexImageSource

Exposes the JavaScript HTMLCanvasElement to Kotlin

HTMLDListElement

abstract external class HTMLDListElement : HTMLElement

Exposes the JavaScript HTMLDListElement to Kotlin

HTMLDataElement

abstract external class HTMLDataElement : HTMLElement

Exposes the JavaScript HTMLDataElement to Kotlin

HTMLDataListElement

abstract external class HTMLDataListElement : HTMLElement

Exposes the JavaScript HTMLDataListElement to Kotlin

HTMLDetailsElement

abstract external class HTMLDetailsElement : HTMLElement

Exposes the JavaScript HTMLDetailsElement to Kotlin

HTMLDialogElement

abstract external class HTMLDialogElement : HTMLElement

Exposes the JavaScript HTMLDialogElement to Kotlin

HTMLDirectoryElement

abstract external class HTMLDirectoryElement : HTMLElement

HTMLDivElement

abstract external class HTMLDivElement : HTMLElement

Exposes the JavaScript HTMLDivElement to Kotlin

HTMLEmbedElement

abstract external class HTMLEmbedElement : HTMLElement

Exposes the JavaScript HTMLEmbedElement to Kotlin

HTMLFieldSetElement

abstract external class HTMLFieldSetElement : HTMLElement

Exposes the JavaScript HTMLFieldSetElement to Kotlin

HTMLFontElement

abstract external class HTMLFontElement : HTMLElement

Exposes the JavaScript HTMLFontElement to Kotlin

HTMLFormElement

abstract external class HTMLFormElement : HTMLElement

Exposes the JavaScript HTMLFormElement to Kotlin

HTMLFrameElement

abstract external class HTMLFrameElement : HTMLElement

HTMLFrameSetElement

abstract external class HTMLFrameSetElement : 
    HTMLElement,
    WindowEventHandlers

Exposes the JavaScript HTMLFrameSetElement to Kotlin

HTMLHRElement

abstract external class HTMLHRElement : HTMLElement

Exposes the JavaScript HTMLHRElement to Kotlin

HTMLHeadElement

abstract external class HTMLHeadElement : HTMLElement

Exposes the JavaScript HTMLHeadElement to Kotlin

HTMLHeadingElement

abstract external class HTMLHeadingElement : HTMLElement

Exposes the JavaScript HTMLHeadingElement to Kotlin

HTMLHtmlElement

abstract external class HTMLHtmlElement : HTMLElement

Exposes the JavaScript HTMLHtmlElement to Kotlin

HTMLIFrameElement

abstract external class HTMLIFrameElement : HTMLElement

Exposes the JavaScript HTMLIFrameElement to Kotlin

HTMLImageElement

abstract external class HTMLImageElement : 
    HTMLElement,
    TexImageSource,
    HTMLOrSVGImageElement

Exposes the JavaScript HTMLImageElement to Kotlin

HTMLInputElement

abstract external class HTMLInputElement : HTMLElement

Exposes the JavaScript HTMLInputElement to Kotlin

HTMLKeygenElement

abstract external class HTMLKeygenElement : HTMLElement

Exposes the JavaScript HTMLKeygenElement to Kotlin

HTMLLIElement

abstract external class HTMLLIElement : HTMLElement

Exposes the JavaScript HTMLLIElement to Kotlin

HTMLLabelElement

abstract external class HTMLLabelElement : HTMLElement

Exposes the JavaScript HTMLLabelElement to Kotlin

HTMLLegendElement

abstract external class HTMLLegendElement : HTMLElement

Exposes the JavaScript HTMLLegendElement to Kotlin

HTMLLinkElement

abstract external class HTMLLinkElement : 
    HTMLElement,
    LinkStyle

Exposes the JavaScript HTMLLinkElement to Kotlin

HTMLMapElement

abstract external class HTMLMapElement : HTMLElement

Exposes the JavaScript HTMLMapElement to Kotlin

HTMLMarqueeElement

abstract external class HTMLMarqueeElement : HTMLElement

HTMLMediaElement

abstract external class HTMLMediaElement : HTMLElement

Exposes the JavaScript HTMLMediaElement to Kotlin

HTMLMenuElement

abstract external class HTMLMenuElement : HTMLElement

HTMLMenuItemElement

abstract external class HTMLMenuItemElement : HTMLElement

HTMLMetaElement

abstract external class HTMLMetaElement : HTMLElement

Exposes the JavaScript HTMLMetaElement to Kotlin

HTMLMeterElement

abstract external class HTMLMeterElement : HTMLElement

Exposes the JavaScript HTMLMeterElement to Kotlin

HTMLModElement

abstract external class HTMLModElement : HTMLElement

Exposes the JavaScript HTMLModElement to Kotlin

HTMLOListElement

abstract external class HTMLOListElement : HTMLElement

Exposes the JavaScript HTMLOListElement to Kotlin

HTMLObjectElement

abstract external class HTMLObjectElement : HTMLElement

Exposes the JavaScript HTMLObjectElement to Kotlin

HTMLOptGroupElement

abstract external class HTMLOptGroupElement : 
    HTMLElement,
    UnionHTMLOptGroupElementOrHTMLOptionElement

Exposes the JavaScript HTMLOptGroupElement to Kotlin

HTMLOptionElement

abstract external class HTMLOptionElement : 
    HTMLElement,
    UnionHTMLOptGroupElementOrHTMLOptionElement

Exposes the JavaScript HTMLOptionElement to Kotlin

HTMLOutputElement

abstract external class HTMLOutputElement : HTMLElement

Exposes the JavaScript HTMLOutputElement to Kotlin

HTMLParagraphElement

abstract external class HTMLParagraphElement : HTMLElement

Exposes the JavaScript HTMLParagraphElement to Kotlin

HTMLParamElement

abstract external class HTMLParamElement : HTMLElement

Exposes the JavaScript HTMLParamElement to Kotlin

HTMLPictureElement

abstract external class HTMLPictureElement : HTMLElement

Exposes the JavaScript HTMLPictureElement to Kotlin

HTMLPreElement

abstract external class HTMLPreElement : HTMLElement

Exposes the JavaScript HTMLPreElement to Kotlin

HTMLProgressElement

abstract external class HTMLProgressElement : HTMLElement

Exposes the JavaScript HTMLProgressElement to Kotlin

HTMLQuoteElement

abstract external class HTMLQuoteElement : HTMLElement

Exposes the JavaScript HTMLQuoteElement to Kotlin

HTMLScriptElement

abstract external class HTMLScriptElement : 
    HTMLElement,
    HTMLOrSVGScriptElement

Exposes the JavaScript HTMLScriptElement to Kotlin

HTMLSelectElement

abstract external class HTMLSelectElement : 
    HTMLElement,
    ItemArrayLike<Element>

Exposes the JavaScript HTMLSelectElement to Kotlin

HTMLSlotElement

abstract external class HTMLSlotElement : HTMLElement

Exposes the JavaScript HTMLSlotElement to Kotlin

HTMLSourceElement

abstract external class HTMLSourceElement : HTMLElement

Exposes the JavaScript HTMLSourceElement to Kotlin

HTMLSpanElement

abstract external class HTMLSpanElement : HTMLElement

Exposes the JavaScript HTMLSpanElement to Kotlin

HTMLStyleElement

abstract external class HTMLStyleElement : 
    HTMLElement,
    LinkStyle

Exposes the JavaScript HTMLStyleElement to Kotlin

HTMLTableCaptionElement

abstract external class HTMLTableCaptionElement : HTMLElement

Exposes the JavaScript HTMLTableCaptionElement to Kotlin

HTMLTableCellElement

abstract external class HTMLTableCellElement : HTMLElement

Exposes the JavaScript HTMLTableCellElement to Kotlin

HTMLTableColElement

abstract external class HTMLTableColElement : HTMLElement

Exposes the JavaScript HTMLTableColElement to Kotlin

HTMLTableElement

abstract external class HTMLTableElement : HTMLElement

Exposes the JavaScript HTMLTableElement to Kotlin

HTMLTableRowElement

abstract external class HTMLTableRowElement : HTMLElement

Exposes the JavaScript HTMLTableRowElement to Kotlin

HTMLTableSectionElement

abstract external class HTMLTableSectionElement : HTMLElement

Exposes the JavaScript HTMLTableSectionElement to Kotlin

HTMLTemplateElement

abstract external class HTMLTemplateElement : HTMLElement

Exposes the JavaScript HTMLTemplateElement to Kotlin

HTMLTextAreaElement

abstract external class HTMLTextAreaElement : HTMLElement

Exposes the JavaScript HTMLTextAreaElement to Kotlin

HTMLTimeElement

abstract external class HTMLTimeElement : HTMLElement

Exposes the JavaScript HTMLTimeElement to Kotlin

HTMLTitleElement

abstract external class HTMLTitleElement : HTMLElement

Exposes the JavaScript HTMLTitleElement to Kotlin

HTMLTrackElement

abstract external class HTMLTrackElement : HTMLElement

Exposes the JavaScript HTMLTrackElement to Kotlin

HTMLUListElement

abstract external class HTMLUListElement : HTMLElement

Exposes the JavaScript HTMLUListElement to Kotlin

HTMLUnknownElement

abstract external class HTMLUnknownElement : HTMLElement

Exposes the JavaScript HTMLUnknownElement to Kotlin