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
Companion Object Properties
ATTRIBUTE_NODE
val ATTRIBUTE_NODE: Short
CDATA_SECTION_NODE
val CDATA_SECTION_NODE: Short
COMMENT_NODE
val COMMENT_NODE: Short
DOCUMENT_FRAGMENT_NODE
val DOCUMENT_FRAGMENT_NODE: Short
DOCUMENT_NODE
val DOCUMENT_NODE: Short
DOCUMENT_POSITION_CONTAINED_BY
val DOCUMENT_POSITION_CONTAINED_BY: Short
DOCUMENT_POSITION_CONTAINS
val DOCUMENT_POSITION_CONTAINS: Short
DOCUMENT_POSITION_DISCONNECTED
val DOCUMENT_POSITION_DISCONNECTED: Short
DOCUMENT_POSITION_FOLLOWING
val DOCUMENT_POSITION_FOLLOWING: Short
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
val DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: Short
DOCUMENT_POSITION_PRECEDING
val DOCUMENT_POSITION_PRECEDING: Short
DOCUMENT_TYPE_NODE
val DOCUMENT_TYPE_NODE: Short
ELEMENT_NODE
val ELEMENT_NODE: Short
ENTITY_NODE
val ENTITY_NODE: Short
ENTITY_REFERENCE_NODE
val ENTITY_REFERENCE_NODE: Short
NOTATION_NODE
val NOTATION_NODE: Short
PROCESSING_INSTRUCTION_NODE
val PROCESSING_INSTRUCTION_NODE: Short
TEXT_NODE
val TEXT_NODE: Short
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,
GlobalEventHandlers,
DocumentAndElementEventHandlers,
ElementContentEditable,
ElementCSSInlineStyle
SVGElement
Exposes the JavaScript SVGElement to Kotlin
abstract class SVGElement :
Element,
ElementCSSInlineStyle,
GlobalEventHandlers,
SVGElementInstance