Element
Constructors
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
id
open var id: String
innerHTML
open var innerHTML: String
localName
open val localName: String
namespaceURI
open val namespaceURI: String?
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
tagName
open val tagName: String
Functions
attachShadow
fun attachShadow(init: ShadowRootInit): ShadowRoot
getAttribute
fun getAttribute(qualifiedName: String): String?
getAttributeNames
fun getAttributeNames(): Array<String>
getAttributeNode
fun getAttributeNode(qualifiedName: String): Attr?
getAttributeNodeNS
fun getAttributeNodeNS(
namespace: String?,
localName: String
): Attr?
getAttributeNS
fun getAttributeNS(
namespace: String?,
localName: String
): String?
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
hasPointerCapture
fun hasPointerCapture(pointerId: Int): Boolean
insertAdjacentHTML
fun insertAdjacentHTML(position: String, text: String)
insertAdjacentText
fun insertAdjacentText(where: String, data: String)
matches
fun matches(selectors: String): Boolean
releasePointerCapture
fun releasePointerCapture(pointerId: Int)
removeAttribute
fun removeAttribute(qualifiedName: String)
removeAttributeNS
fun removeAttributeNS(namespace: String?, localName: String)
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)
setPointerCapture
fun setPointerCapture(pointerId: Int)
webkitMatchesSelector
fun webkitMatchesSelector(selectors: String): Boolean
Extension Properties
Extension Functions
addClass
Adds CSS class to element. Has no effect if all specified classes are already in class attribute of the element
fun Element.addClass(vararg cssClasses: String): Boolean
hasClass
Returns true if the element has the given CSS class style in its 'class' attribute
fun Element.hasClass(cssClass: String): Boolean
removeClass
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
Inheritors
HTMLElement
Exposes the JavaScript HTMLElement to Kotlin
abstract class HTMLElement :
Element,
ElementCSSInlineStyle,
GlobalEventHandlers,
DocumentAndElementEventHandlers,
ElementContentEditable
SVGElement
Exposes the JavaScript SVGElement to Kotlin
abstract class SVGElement :
Element,
ElementCSSInlineStyle,
GlobalEventHandlers,
SVGElementInstance